ctdb-tool: Correctly print timed out event scripts output
commit71b89b2b7a9768de437347e6678370b2682da892
authorAmitay Isaacs <amitay@gmail.com>
Mon, 20 Jul 2015 06:37:58 +0000 (20 16:37 +1000)
committerMartin Schwenke <martins@samba.org>
Wed, 22 Jul 2015 09:56:24 +0000 (22 11:56 +0200)
treef3ac56c77feca31b56050d9e10a2db6e55edca3e
parent45e3b05966ddd013ea931e65295978525261f7f4
ctdb-tool: Correctly print timed out event scripts output

The timed out error is ignored for certain events (start_recovery,
recoverd, takeip, releaseip).  If these events time out, then the debug
hung script outputs the following:

 3 scripts were executed last releaseip cycle
 00.ctdb              Status:OK    Duration:4.381 Thu Jul 16 23:45:24 2015
 01.reclock           Status:OK    Duration:13.422 Thu Jul 16 23:45:28 2015
 10.external          Status:DISABLED
 10.interface         Status:OK    Duration:-1437083142.208 Thu Jul 16 23:45:42 2015

The endtime for timed out scripts is not set.  Since the status is not
returned as -ETIME for some events, ctdb scriptstatus prints -ve duration.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
ctdb/tools/ctdb.c