Allow start/stop of multiple instances at once
authorIustin Pop <iustin@google.com>
Mon, 17 Sep 2007 09:12:45 +0000 (09:12 +0000)
committerIustin Pop <iustin@google.com>
Mon, 17 Sep 2007 09:12:45 +0000 (09:12 +0000)
commit312ac745c1fd58babf39b0f5461d05d38145b636
treee72a84ea7af20a234aa05a4b5431d1065067788a
parentfc95f88f30dc3429014335cfd3e5b07197c302fe
Allow start/stop of multiple instances at once

This is an initial version of the multi-instance start/stop, which
allows the gnt-instance startup and shutdown subcommands to work on
multiple instances at once.

The available selections are:
  - "gnt-instance startup --instance name..." which is the default, and
    if passed only one argument it behaves like the original command)
  - "gnt-instance startup --node name..." will work on all instances
    having either primary or secondary one of the passed names
  - "gnt-instance startup --primary name..." will work on all instances
    having primary node one of the passed names
  - "gnt-instance startup --secondary name..." will work on all
    instances having as secondary node one of the passed names
  - "gnt-instance startup --all" will work on all instances

This allows a simple cluster-wide shutdown or node shutdown (or
startup).

Note that this version stops at the first error - it will not try to
start the 2nd instance selected if there is a critical error with the
1st one.

Also note that this version is not faster than simply running manually
"gnt-instance shutdown NAME", because it doesn't parallelize the
shutdown/startup actions.

Reviewed-by: imsnah,roman.marxer
man/gnt-instance.sgml
scripts/gnt-instance