ctdb-daemon: Reset script timeout count in monitor code
authorMartin Schwenke <martin@meltin.net>
Wed, 28 Oct 2015 05:42:41 +0000 (16:42 +1100)
committerAmitay Isaacs <amitay@samba.org>
Mon, 16 Nov 2015 07:42:11 +0000 (08:42 +0100)
This is the only place it is used.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/server/ctdb_monitor.c
ctdb/server/eventscript.c

index 44cc54739de97de8dbc02cadd6542bc77adf86c3..80abbff31b1520e2cfaea591ee62d8984485b535 100644 (file)
@@ -152,6 +152,8 @@ static void ctdb_health_callback(struct ctdb_context *ctdb, int status, void *p)
                        /* We pretend this is OK. */
                        goto after_change_status;
                }
+       } else {
+               ctdb->event_script_timeouts = 0;
        }
 
        if (status != 0 && !(node->flags & NODE_FLAGS_UNHEALTHY)) {
index 117ec807f8d0522da51569eb92e0423763e040d6..5bc2ee8c503bf412ca5f77d22c790962c06efbe2 100644 (file)
@@ -420,7 +420,6 @@ static void ctdb_event_script_handler(struct tevent_context *ev,
                               state->options, status));
                }
 
-               ctdb->event_script_timeouts = 0;
                talloc_free(state);
                return;
        }