ctdb/eventscripts: Do not reconfigure in "monitor" events
authorMartin Schwenke <martin@meltin.net>
Mon, 9 Dec 2013 04:54:52 +0000 (15:54 +1100)
committerAmitay Isaacs <amitay@samba.org>
Tue, 17 Dec 2013 05:32:35 +0000 (06:32 +0100)
commitfdccaab2a9a1b9d7eebcd7a4d121dbf68ea48dcd
treeba45b0e858a0d43b8254d58e5802dd7a61ef9b02
parent970a6efa3b5fc11aa4ff79049738bb971a129a62
ctdb/eventscripts: Do not reconfigure in "monitor" events

"monitor" events can be cancelled.  If a reconfigure action does a
service restart then the "monitor" event can be cancelled at the
inconvenient moment after the service is stopped.  In this case the
service stays down and the node may become unhealthy (depending on
whether there are any repair actions in the monitor event).

A long time ago we did service reconfiguration in "monitor" events
following failovers.  Service reconfiguration was then moved to the
"ipreallocated" event.  However, reconfiguration in "monitor" events
has been kept as a last resort in case an "ipreallocate" event does
not occur.  The only important case that this covers is "ctdb
deleteip", where "releaseip" events are generated without a
corresponding "ipreallocated".  Therefore, IPs can be deleted without
running the required service reconfiguration.

The supported way of removing IP addresses is now via "ctdb
reloadips", which always causes a takeover run with a corresponding
"ipreallocate" event.

This means that service reconfiguration in "monitor" events is no
longer required and should be removed because it is unsafe.

Also update the associated tests.  Make the first confirm that the
monitor event no longer does reconfiguration.  Change the others to
test that monitor status is correctly replayed when something else is
doing a reconfigure and currently holds the reconfigure lock.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Tue Dec 17 06:32:35 CET 2013 on sn-devel-104
ctdb/config/functions
ctdb/tests/eventscripts/60.nfs.multi.002.sh
ctdb/tests/eventscripts/60.nfs.multi.003.sh
ctdb/tests/eventscripts/60.nfs.multi.004.sh
ctdb/tests/eventscripts/60.nfs.multi.005.sh