gnt-cluster epo: Adding --power-delay flag
authorRené Nussbaumer <rn@google.com>
Wed, 9 Mar 2011 09:50:57 +0000 (10:50 +0100)
committerRené Nussbaumer <rn@google.com>
Wed, 9 Mar 2011 13:36:32 +0000 (14:36 +0100)
Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

lib/client/gnt_cluster.py
man/gnt-cluster.rst

index c6a2aba..3baabf0 100644 (file)
@@ -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"),
   }
index d0c80e8..91cd7ce 100644 (file)
@@ -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
 ~~~~~~~~~