From cfed3b9fe20d6ed1b997ef83517cff8ae285b804 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ren=C3=A9=20Nussbaumer?= Date: Wed, 9 Mar 2011 10:50:57 +0100 Subject: [PATCH] gnt-cluster epo: Adding --power-delay flag MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: René Nussbaumer Reviewed-by: Iustin Pop --- lib/client/gnt_cluster.py | 5 +++-- man/gnt-cluster.rst | 30 +++++++++++++++++------------- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/lib/client/gnt_cluster.py b/lib/client/gnt_cluster.py index c6a2aba..3baabf0 100644 --- a/lib/client/gnt_cluster.py +++ b/lib/client/gnt_cluster.py @@ -917,7 +917,8 @@ def _OobPower(opts, node_list, power): op = opcodes.OpOobCommand(node_names=node_list, command=command, ignore_status=True, - timeout=opts.oob_timeout) + timeout=opts.oob_timeout, + power_delay=opts.power_delay) result = SubmitOpCode(op, opts=opts) errs = 0 for node_result in result: @@ -1314,7 +1315,7 @@ commands = { "epo": ( Epo, [ArgUnknown()], [FORCE_OPT, ON_OPT, GROUPS_OPT, ALL_OPT, OOB_TIMEOUT_OPT, - SHUTDOWN_TIMEOUT_OPT], + SHUTDOWN_TIMEOUT_OPT, POWER_DELAY_OPT], "[opts...] [args]", "Performs an emergency power-off on given args"), } diff --git a/man/gnt-cluster.rst b/man/gnt-cluster.rst index d0c80e8..91cd7ce 100644 --- a/man/gnt-cluster.rst +++ b/man/gnt-cluster.rst @@ -96,19 +96,23 @@ argument *--yes-do-it.* EPO ~~~ -**epo** [--on] [--groups|--all] *arguments* - -Performs an emergency power-off on nodes given as arguments. If ``--groups`` -is given, arguments are node groups. If ``--all`` is provided, the whole -cluster will be shut down. - -The ``--on`` flag recovers the cluster after an emergency power-off - -Please note that the master node will not be turned down or up automatically. -It will just be left in a state, where you can manully perform the shutdown of -that one node. If the master is in the list of affected nodes and this is not a -complete cluster emergency power-off (e.g. using ``--all``), you're required to -do a master failover to another node not affected. +**epo** [--on] [--groups|--all] [--power-delay] *arguments* + +Performs an emergency power-off on nodes given as arguments. If +``--groups`` is given, arguments are node groups. If ``--all`` is +provided, the whole cluster will be shut down. + +The ``--on`` flag recovers the cluster after an emergency power-off. +When powering on the cluster you can use ``--power-delay`` to define the +time in seconds (fractions allowed) waited between powering on +individual nodes. + +Please note that the master node will not be turned down or up +automatically. It will just be left in a state, where you can manully +perform the shutdown of that one node. If the master is in the list of +affected nodes and this is not a complete cluster emergency power-off +(e.g. using ``--all``), you're required to do a master failover to +another node not affected. GETMASTER ~~~~~~~~~ -- 1.7.10.4