eventscripts: Move NFS reconfigure to "ipreallocated" event
authorMartin Schwenke <martin@meltin.net>
Thu, 8 Aug 2013 04:37:03 +0000 (14:37 +1000)
committerAmitay Isaacs <amitay@gmail.com>
Wed, 14 Aug 2013 06:15:14 +0000 (16:15 +1000)
Doing this in the "monitor" event is unsafe because it causes the node
health status to flip-flop.  At the moment when a node goes unhealthy
it is failed out, IPs are released and the monitor event handles the
reconfigure, returning 0 even though the service failure is
unresolved.

This change was made in the master branch a long time ago.

Signed-off-by: Martin Schwenke <martin@meltin.net>
config/events.d/60.nfs

index ac22b7b5e08826ac5bc0e45cb5be21d5ea230f91..f567c82a400ad6495e3b285ee388b7909644210f 100755 (executable)
@@ -70,11 +70,6 @@ case "$1" in
        ;;
 
       monitor)
-       if ctdb_service_needs_reconfigure ; then
-           ctdb_service_reconfigure
-           exit 0
-       fi
-
        update_tickles 2049
 
        # check that statd responds to rpc requests
@@ -201,6 +196,11 @@ case "$1" in
                ;;
 
     ipreallocated)
+       if ctdb_service_needs_reconfigure ; then
+           ctdb_service_reconfigure
+           exit 0
+       fi
+
        # if the ips have been reallocated, we must restart the lockmanager
        # across all nodes and ping all statd listeners
        [ -x $CTDB_BASE/statd-callout ] && {