eventscript: fix monitoring when killed by another script command
authorRusty Russell <rusty@rustcorp.com.au>
Thu, 10 Dec 2009 09:55:33 +0000 (20:25 +1030)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Mon, 14 Dec 2009 04:46:14 +0000 (15:46 +1100)
commit0ea0e27d93398df997d3df9d8bf112358af3a4a5
tree7d8ff05bafb57a6123860078870eaa821a8dad32
parent68a8ee99b128a5ec883600735626bdb3bbc9c503
eventscript: fix monitoring when killed by another script command

Commit c1ba1392fe "eventscript: get rid of ctdb_control_event_script_finished
altogether" was wrong: there is one case where we want to free the script
without transferring their status to last_status.  This happens because we
always kill an running monitor command when we run any other command.

This still isn't quite right (and never was): the callback will be called
with status value 0, which might flip us to HEALTHY if we were unhealthy.
This is conveniently fixed in my next set of patches :)

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
server/eventscript.c