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>
Thu, 3 Mar 2011 19:55:24 +0000 (06:55 +1100)
Dont shutdown ctdbd completely, that only makes the problem worse.

server/ctdb_recover.c

index b48b4e7214f3a1e90ca776f3c414f3ab8e9f9e55..4435ab315d65bfb220bdabd337b5d5016fcadff5 100644 (file)
@@ -1161,18 +1161,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.