tool: Correctly print timed out event scripts output
authorAmitay Isaacs <amitay@gmail.com>
Mon, 20 Jul 2015 06:37:58 +0000 (16:37 +1000)
committerAmitay Isaacs <amitay@gmail.com>
Fri, 31 Jul 2015 03:35:01 +0000 (13:35 +1000)
commitaf7c066630ebaf1398b6970acccb28d3a4bd42e7
tree2635280c4cf8bc3f5a5a9b957c4eef459ff870c5
parented3c1f234ea76d32c35361f5c92a9dc2ead86121
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>
(Imported from commit 71b89b2b7a9768de437347e6678370b2682da892)
tools/ctdb.c