add a new command "ctdb scriptstatus"
authorroot <root@rcn1.VSOFS1.COM>
Mon, 23 Mar 2009 08:07:45 +0000 (19:07 +1100)
committerroot <root@rcn1.VSOFS1.COM>
Mon, 23 Mar 2009 08:07:45 +0000 (19:07 +1100)
commitc98f90ad61c9b1e679116fbed948ddca4111968d
treea5cdc2f224ce069a9dd2c963716b87a3c811809a
parent16f31786a031255ab5b3099a0a3c745de973347a
add a new command "ctdb scriptstatus"
this command shows which eventscripts were executed during the last monitoring cycle and the status from each eventscript.

If an eventscript timedout or returned an error we also
show the output from the eventscript.

Example :
[root@rcn1 ctdb-git]# ./bin/ctdb scriptstatus
6 scripts were executed last monitoring cycle
00.ctdb              Status:OK    Duration:0.021 Mon Mar 23 19:04:32 2009
10.interface         Status:OK    Duration:0.048 Mon Mar 23 19:04:32 2009
20.multipathd        Status:OK    Duration:0.011 Mon Mar 23 19:04:33 2009
40.vsftpd            Status:OK    Duration:0.011 Mon Mar 23 19:04:33 2009
41.httpd             Status:OK    Duration:0.011 Mon Mar 23 19:04:33 2009
50.samba             Status:ERROR    Duration:0.057 Mon Mar 23 19:04:33 2009
   OUTPUT:ERROR: Samba tcp port 445 is not responding

Add a new helper function "switch_from_server_to_client()" which both
the recovery daemon can use as well as in the child process we start for running the actual eventscripts.

Create several new controls, both for the eventscript child process to inform the master daemon of the current status of the scripts as well as for the ctdb tool to extract this information from the runninc daemon.
client/ctdb_client.c
include/ctdb.h
include/ctdb_private.h
server/ctdb_control.c
server/ctdb_logging.c
server/eventscript.c
tools/ctdb.c