server/recoverd: if we can't get the recovery lock, ban ourself
authorStefan Metzmacher <metze@samba.org>
Mon, 30 Aug 2010 16:25:28 +0000 (18:25 +0200)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Tue, 14 Sep 2010 05:49:01 +0000 (15:49 +1000)
metze

server/ctdb_recoverd.c

index 4df6ce0..30c34b3 100644 (file)
@@ -1382,8 +1382,10 @@ static int do_recovery(struct ctdb_recoverd *rec,
                DEBUG(DEBUG_ERR,("Taking out recovery lock from recovery daemon\n"));
                start_time = timeval_current();
                if (!ctdb_recovery_lock(ctdb, true)) {
-                       ctdb_set_culprit(rec, pnn);
-                       DEBUG(DEBUG_ERR,("Unable to get recovery lock - aborting recovery\n"));
+                       DEBUG(DEBUG_ERR,("Unable to get recovery lock - aborting recovery "
+                                        "and ban ourself for %u seconds\n",
+                                        ctdb->tunable.recovery_ban_period));
+                       ctdb_ban_node(rec, pnn, ctdb->tunable.recovery_ban_period);
                        return -1;
                }
                ctdb_ctrl_report_recd_lock_latency(ctdb, CONTROL_TIMEOUT(), timeval_elapsed(&start_time));