Eventscripts - enhance ctdb_replay_monitor_status()
authorMartin Schwenke <martin@meltin.net>
Wed, 31 Aug 2011 05:34:43 +0000 (15:34 +1000)
committerMartin Schwenke <martin@meltin.net>
Wed, 31 Aug 2011 05:34:43 +0000 (15:34 +1000)
commitdda44d026e0c1b02feb02185b8c200a542be341a
tree7e1ed08665f01790d0730997f7506dfc730a596f
parent5be904fb1fbd546618d25509b41ab836db62a70a
Eventscripts - enhance ctdb_replay_monitor_status()

Print useful output and return a suitable exit code.

The DISABLED and TIMEDOUT statuses use fake negative return codes, and
these can't be faked from the shell.  So we map DISABLED to OK and
TIMEDOUT to ERROR - this should avoid nearly all surprises.  When we
do this we add a note to the beginning of the output.  The alternative
is to "fix" ctdbd to use only codes that can actually be returned by
shell scripts.  However, the reason for using negative codes is
probably to distinguish them from real ones...

Signed-off-by: Martin Schwenke <martin@meltin.net>
config/functions