This article is being updated. Please be aware the content herein, not limited to version numbers and slight syntax changes, may not match the output from the most recent versions of Bright. This notation will be removed when the content has been updated.
The following technique can save labor when you add many new nodes to increase a cluster’s size.
It can be done using a script that comes in the pythoncm examples at:
/cm/local/examples/cmd/python/newnodes.py
Ensure your Bright Cluster Manager is updated to the latest version before using the script.
The script detects MAC addresses and associates them with physical node identities. These identities are typically objects created earlier. In other words, they are typically “placeholder identities” until the association is actually done.
For example, when the newnodes.py script runs, the first MAC address detected with the new nodes property gets attached to the first physical node that does not have a MAC address as a property.
[Master]% device
[Master->device]% newnodes
MAC First appeared Detected on switch port
------------------ ----------------------------- ------------------------
FA:16:3E:26:38:EE Tue, 16 Dec 2014 02:01:43 PST [no port detected]
FA:16:3E:1D:16:0D Tue, 16 Dec 2014 02:05:12 PST [no port detected]
[root@Master ~]# cmsh
[Master]% device list
Type Hostname MAC Category Ip Network Status
----------- -------- --------- -------- -------------- ----------- ---------------------
HeadNode Master FA:16:3E:DA:91:98 10.141.255.254 internalnet [ UP ]
PhysicalNode node002 FA:16:3E:39:93:89 default 10.141.0.1 internalnet [ UP ]
PhysicalNode node003 00:00:00:00:00:00 default 10.141.0.1 internalnet [ DOWN ] (Unassigned)
PhysicalNode node004 00:00:00:00:00:00 default 10.141.0.1 internalnet [ DOWN ] (Unassigned)
Note that the MAC address is assigned to a node in the order in which the MAC address was detected. So the first detected MAC address is assigned to the first unassigned physical node. This means that you should typically plug and power on the nodes in the order you would like the numbering to go.
After powering up the nodes, you can do a dry run with the script by running it from your terminal without any options:
[root@headnode ~]# /cm/local/examples/cmd/python/newnodes.py
Assign mac FA:16:3E:26:38:EE to node003
Assign mac FA:16:3E:1D:16:0D to node004
The script shows, as output, the detected MACs and tells you which nodes the MAC address is about to be assigned to. But at this stage, the changes are not yet committed.
Once you are sure that the MACs are in the order you want with the Physical nodes, you can run the script with the -s option, which saves the assignment:
[root@headnode ~]# /cm/local/examples/cmd/python/newnodes.py -s
Assign mac FA:16:3E:26:38:EE to node003
Committed: node003
Assign mac FA:16:3E:1D:16:0D to node004
Committed: node004
The assignment is now completed. From now on, the nodes installer will install the nodes automatically, without you having to feed it the MAC address manually to identify the node.
The Administrator manual also describes assigning new nodes in bulk in the section on advanced uses of the newnodes command.