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 are adding a large number of new nodes to the cluster in order to embiggen it.
It can be done using a script that comes in the pythoncm examples at:
/cm/local/examples/cmd/python/newnodes.py
Make sure your Bright Cluster Manager is updated to the latest version before using the script.
The script takes the MAC addresses that are detected and associates them with physical node identities. These identities are typically objects that have been 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 which has no 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 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 in which 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 state 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 option -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.
Assigning new nodes in bulk is also described in the Administrator manual, in the section on advanced uses of the newnodes command.