[ctdb] monitor event timeout ignored

Stefan (metze) Metzmacher metze at samba.org
Sat Feb 12 05:20:16 MST 2011


Hi Ronnie,

can you explain the reason, why timeouts in monitor events
are ignored now with this commit:

http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=commitdiff;h=b6d939c9758c7d2e39206838492f2f644dd61db7

--- a/server/eventscript.c
+++ b/server/eventscript.c
@@ -516,7 +516,21 @@ static void ctdb_event_script_timeout(struct
event_context *ev, struct timed_eve
        DEBUG(DEBUG_ERR,("Event script timed out : %s %s %s count : %u
pid : %d\n",
                         current->name,
ctdb_eventscript_call_names[state->call], state->options,
ctdb->event_script_timeouts, state->child));
-       state->scripts->scripts[state->current].status = -ETIME;
+       /* ignore timeouts for these events */
+       switch (state->call) {
+       case CTDB_EVENT_START_RECOVERY:
+       case CTDB_EVENT_RECOVERED:
+       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));
+               break;
+        default:
+               state->scripts->scripts[state->current].status = -ETIME;
+       }

If events timeout, there's something broken on the local node
and it should mark itself as unhealthy as soon as possible.

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20110212/2a03e1dd/attachment.pgp>


More information about the samba-technical mailing list