dont shutdown a node when the reclock file is temporarily unavailable.
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Thu, 15 Oct 2009 02:19:10 +0000 (13:19 +1100)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Thu, 15 Oct 2009 02:19:10 +0000 (13:19 +1100)
Leave the node as UNHEALTHY this stops clients from accessing the node until
the reclock file can be accessed again

config/events.d/01.reclock

index 74b9ceac8686e071f95fc41f8b7bf83c5fb6409a..b4f033c81e617306513da80e62762c0bfcf322f1 100755 (executable)
@@ -21,13 +21,6 @@ case $cmd in
        ;;
 
       monitor)
-       ctdb_counter_incr "$RECLOCKCOUNT"
-       ctdb_counter_limit "$RECLOCKCOUNT" 20 && {
-               echo "Reclock file can not be accessed. Shutting down."
-               sleep 1
-               ctdb shutdown
-       }
-
        RECLOCKFILE=`ctdb -Y getreclock`
        [ -z "$RECLOCKFILE" ] && {
                # we are not using a reclock file
@@ -35,6 +28,8 @@ case $cmd in
                exit 0
        }
 
+       ctdb_counter_incr "$RECLOCKCOUNT"
+
        # try stat the reclock file as a background process
        # so that we dont block in case the cluster filesystem is unavailable
        (