tools/ctdb: "ctdb runstate" now accepts optional expected run state arguments
authorMartin Schwenke <martin@meltin.net>
Fri, 11 Jan 2013 03:09:14 +0000 (14:09 +1100)
committerAmitay Isaacs <amitay@gmail.com>
Fri, 24 May 2013 04:08:07 +0000 (14:08 +1000)
commit4a2effcc455be67ff4a779a59ca81ba584312cd6
treededcf845a3b282e40d5350aa4aec05d53bb431b6
parentbf20c3ab090f75f59097b36186347cedb1c445d4
tools/ctdb: "ctdb runstate" now accepts optional expected run state arguments

If one or more run states are specified then "ctdb runstate" succeeds
only if ctdbd is in one of those run states.

At the moment, if the "setup" event fails then the initscript succeeds
but ctdbd exits almost immediately.  This behaviour isn't very
friendly.

The initscript now waits until ctdbd is in "startup" or "running" run
state via the use of "ctdb runstate startup running", meaning that ctdbd
has successfully passed the "setup" event.

The "setup" event code in 00.ctdb now waits until ctdbd is in the
"setup" run state before proceeding via the use of "ctdb runstate setup".

Signed-off-by: Martin Schwenke <martin@meltin.net>
Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
config/ctdb.init
config/events.d/00.ctdb
doc/ctdb.1.xml
tools/ctdb.c