Download Administrator Manual - Support

Transcript
5.1 Configuring Power Parameters
Powering off the PDU port shuts down the BMC, which saves some additional power—typically a few watts per node. When multiple nodes
share the same PDU port, the PDU port only powers off when all nodes
served by that particular PDU port are powered off.
When a node has to be started up again the power is restored to the
node. It is important that the node BIOS is configured to automatically
power on the node when power is restored.
5.1.4 Custom Power Control
For a device which cannot be controlled through any of the standard existing power control options, it is possible to set a custom power management script. This is then invoked by the cluster management daemon on
the head node whenever a power operation for the device is done.
Power operations are described further in section 5.2.
Using custompowerscript
To set a custom power management script for a device, the powercontrol
attribute is set to custom using either cmgui or cmsh, and the value of
custompowerscript is specified. The value for custompowerscript
is the full path to an executable custom power management script on the
head node(s) of a cluster.
A custom power script is invoked with the following mandatory arguments:
myscript <operation> <device>
where <device> is the name of the device on which the power operation is done, and <operation> is one of the following:
ON
OFF
RESET
STATUS
On success a custom power script exits with exit code 0. On failure,
the script exits with a non-zero exit-code.
Using custompowerscriptargument
The mandatory argument values for <operation> and <device> are
passed to a custom script for processing. For example, in bash the positional variables $1 and $2 are typically used for a custom power script. A
custom power script can also be passed a further argument value by setting the value of custompowerscriptargument for the node via cmsh
or cmgui. This further argument value would then be passed to the positional variable $3 in bash.
An example custom power script is located at /cm/local/examples/
cmd/custompower. In it, setting $3 to a positive integer delays the
script via a sleep command by $3 seconds.
An example that is conceivably more useful than a “sleep $3”
command is to have a “wakeonlan $3” command instead. If the
custompowerscriptargument value is set to the MAC address of the
node, that means the MAC value is passed on to $3. Using this technique,
the power operation ON can then carry out a Wake On LAN operation on
the node from the head node.
© Bright Computing, Inc.
159