daemon: Do not ignore timed out monitor events
authorAmitay Isaacs <amitay@gmail.com>
Tue, 23 Oct 2012 04:06:33 +0000 (15:06 +1100)
committerAmitay Isaacs <amitay@gmail.com>
Thu, 22 Nov 2012 02:00:41 +0000 (13:00 +1100)
If an eventscript times out for monitor event, it is considered successful
and the remaining eventscripts are not run. This can make a node prematurely
healthy, cause healthy node to fail over IPs to this node and this node will
not be able to host those IPs. Thus causing loss of access and in case of NAT-GW
configuration, loss of a default route.

Copy-code-from: 6e68797af67bee36f2bad045f94806e7e98f27e9

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
server/ctdb_tunables.c
server/eventscript.c

index 62a4dd4f8424a80373e24f70425eb38174133f31..9c7000831ebede01e306598e29d2bca93ca22d5c 100644 (file)
@@ -37,7 +37,7 @@ static const struct {
        { "MonitorInterval",     15,  offsetof(struct ctdb_tunable, monitor_interval) },
        { "TickleUpdateInterval",20,  offsetof(struct ctdb_tunable, tickle_update_interval) },
        { "EventScriptTimeout",  30,  offsetof(struct ctdb_tunable, script_timeout) },
-       { "EventScriptTimeoutCount", 1,  offsetof(struct ctdb_tunable, script_timeout_count) },
+       { "EventScriptTimeoutCount", 20,  offsetof(struct ctdb_tunable, script_timeout_count) },
        { "EventScriptUnhealthyOnTimeout", 0, offsetof(struct ctdb_tunable, script_unhealthy_on_timeout) },/* OBSOLETE */
        { "RecoveryGracePeriod", 120,  offsetof(struct ctdb_tunable, recovery_grace_period) },
        { "RecoveryBanPeriod",  300,  offsetof(struct ctdb_tunable, recovery_ban_period) },
index 2f86fddb8289e9256924e0cb3cd4054fd7c6d0b5..9ef1f3d448f72a39e63cfa48961d73808bd89c4e 100644 (file)
@@ -561,7 +561,6 @@ static void ctdb_event_script_timeout(struct event_context *ev, struct timed_eve
        case CTDB_EVENT_TAKE_IP:
        case CTDB_EVENT_RELEASE_IP:
        case CTDB_EVENT_STOPPED:
-       case CTDB_EVENT_MONITOR:
        case CTDB_EVENT_STATUS:
                state->scripts->scripts[state->current].status = 0;
                DEBUG(DEBUG_ERR,("Ignoring hung script for %s call %d\n", state->options, state->call));