Commit 0a1fc31c authored by René Nussbaumer's avatar René Nussbaumer

gnt-node power: Adding --power-delay flag

Signed-off-by: default avatarRené Nussbaumer <rn@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 0c086a13
......@@ -522,7 +522,8 @@ def PowerNode(opts, args):
opcodelist.append(opcodes.OpOobCommand(node_names=args,
command=oob_command,
ignore_status=opts.ignore_status,
timeout=opts.oob_timeout))
timeout=opts.oob_timeout,
power_delay=opts.power_delay))
cli.SetGenericOpcodeOpts(opcodelist, opts)
......@@ -861,7 +862,7 @@ commands = {
[ArgChoice(min=1, max=1, choices=_LIST_POWER_COMMANDS),
ArgNode()],
[SUBMIT_OPT, AUTO_PROMOTE_OPT, PRIORITY_OPT, IGNORE_STATUS_OPT,
FORCE_OPT, NOHDR_OPT, SEP_OPT, OOB_TIMEOUT_OPT],
FORCE_OPT, NOHDR_OPT, SEP_OPT, OOB_TIMEOUT_OPT, POWER_DELAY_OPT],
"on|off|cycle|status [nodes...]",
"Change power state of node by calling out-of-band helper."),
'remove': (
......
......@@ -489,24 +489,29 @@ POWER
~~~~~
**power** [``--force``] [``--ignore-status``] [``--all``]
on|off|cycle|status [*nodes*]
[``--power-delay``] on|off|cycle|status [*nodes*]
This commands calls out to out-of-band management to change the power
state of given node. With ``status`` you get the power status as reported
by the out-of-band management script.
state of given node. With ``status`` you get the power status as
reported by the out-of-band management script.
Using ``--force`` you skip the confirmation to do the operation. Currently this
only has effect on ``off`` and ``cycle``. On those two you can *not* operate on
the master. However, the command will provide you with the command to invoke to
operate on the master nerver-mind. This is considered harmful and Ganeti does
not support the use of it.
Using ``--force`` you skip the confirmation to do the operation.
Currently this only has effect on ``off`` and ``cycle``. On those two
you can *not* operate on the master. However, the command will provide
you with the command to invoke to operate on the master nerver-mind.
This is considered harmful and Ganeti does not support the use of it.
Providing ``--ignore-status`` will ignore the offline=N state of a node and
continue with power off.
Providing ``--ignore-status`` will ignore the offline=N state of a node
and continue with power off.
``--power-delay`` specifies the time in seconds (factions allowed)
waited between powering on the next node. This is by default 2 seconds
but can increased if needed with this option.
*nodes* are optional. If not provided it will call out for every node in
the cluster. Except for the ``off`` and ``cycle`` command where you've
to explicit use ``--all`` to select all.
*nodes* are optional. If not provided it will call out for every node in the
cluster. Except for the ``off`` and ``cycle`` command where you've to explicit
use ``-all`` to select all.
HEALTH
~~~~~~
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment