Restart recovery dameon if it looks like it hung.
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Thu, 3 Mar 2011 19:55:24 +0000 (06:55 +1100)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Sun, 6 Mar 2011 19:39:10 +0000 (06:39 +1100)
Dont shutdown ctdbd completely, that only makes the problem worse.

(This used to be ctdb commit 221ecc2509f6d267d1854c1042ff945a620510bb)

ctdb/server/ctdb_recover.c

index 0cbd7dc3e20591a1c91f0ce5e7a4549501eb7efe..eb3bf0a50c7dca2f9cbb31304d64b0e6ed9a4c95 100644 (file)
@@ -1197,18 +1197,10 @@ static void ctdb_recd_ping_timeout(struct event_context *ev, struct timed_event
                return;
        }
 
-       DEBUG(DEBUG_ERR, ("Final timeout for recovery daemon ping. Shutting down ctdb daemon. (This can be caused if the cluster filesystem has hung)\n"));
+       DEBUG(DEBUG_ERR, ("Final timeout for recovery daemon ping. Restarting recovery daemon. (This can be caused if the cluster filesystem has hung)\n"));
 
        ctdb_stop_recoverd(ctdb);
-       ctdb_stop_keepalive(ctdb);
-       ctdb_stop_monitoring(ctdb);
-       ctdb_release_all_ips(ctdb);
-       if (ctdb->methods != NULL) {
-               ctdb->methods->shutdown(ctdb);
-       }
-       ctdb_event_script(ctdb, CTDB_EVENT_SHUTDOWN);
-       DEBUG(DEBUG_ERR, ("Recovery daemon ping timeout. Daemon has been shut down.\n"));
-       exit(0);
+       ctdb_start_recoverd(ctdb);
 }
 
 /* The recovery daemon will ping us at regular intervals.