ctdbd: When the "setup" event fails log an error and exit, don't abort
authorMartin Schwenke <martin@meltin.net>
Fri, 11 Jan 2013 07:02:51 +0000 (18:02 +1100)
committerAmitay Isaacs <amitay@gmail.com>
Fri, 24 May 2013 04:08:07 +0000 (14:08 +1000)
The "setup" event can fail when one of the eventscripts fails to run
its "setup" event.  If this occurs then the eventscript should log an
error.  The stack trace and core file generated when we abort provides
no useful information.

Signed-off-by: Martin Schwenke <martin@meltin.net>
server/ctdb_daemon.c

index 32c30243ea6f42ee50d66611b7665b266be5b092..cedee09a02f35be28d661fe7fbbda2ace40bf619 100644 (file)
@@ -1032,8 +1032,8 @@ static void ctdb_setup_event_callback(struct ctdb_context *ctdb, int status,
                                      void *private_data)
 {
        if (status != 0) {
-               ctdb_fatal(ctdb, "Failed to run setup event\n");
-               return;
+               DEBUG(DEBUG_ALERT,("Failed to run setup event - exiting\n"));
+               exit(1);
        }
        ctdb_run_notification_script(ctdb, "setup");