From: Ronnie Sahlberg Date: Thu, 13 Sep 2007 04:51:37 +0000 (+1000) Subject: when a ctdb_takeover_run has failed we must make sure that X-Git-Tag: tevent-0.9.20~348^2~2407^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4186d8eaba5bcf5af2be1092df836ae6124a54d6;p=thirdparty%2Fsamba.git when a ctdb_takeover_run has failed we must make sure that need_takeover_run is set to true or else we might forget to rerun it again during the next recovery othervise, need_takeover_run is only set to true IFF the node flags for a remote node and the local nodes differ. It is possible that a takeover run fails and thus the reassignment of ip addresses is incomplete but before we get back to the test in monitor_cluster() that all the node flags of all nodes have converged and they now match each others again. and thus causing monitor_cluster() to fail to realize that a takeover run is needed. (This used to be ctdb commit ae7e866787cebd14394983ce1834387c959d1022) --- diff --git a/ctdb/server/ctdb_recoverd.c b/ctdb/server/ctdb_recoverd.c index 82d6f14a4b8..c39cfda68d1 100644 --- a/ctdb/server/ctdb_recoverd.c +++ b/ctdb/server/ctdb_recoverd.c @@ -909,6 +909,7 @@ static int do_recovery(struct ctdb_recoverd *rec, ret = ctdb_takeover_run(ctdb, nodemap); if (ret != 0) { DEBUG(0, (__location__ " Unable to setup public takeover addresses\n")); + rec->need_takeover_run = true; return -1; } DEBUG(1, (__location__ " Recovery - done takeover\n")); @@ -1745,6 +1746,7 @@ again: ret = ctdb_takeover_run(ctdb, nodemap); if (ret != 0) { DEBUG(0, (__location__ " Unable to setup public takeover addresses - starting recovery\n")); + rec->need_takeover_run = true; do_recovery(rec, mem_ctx, pnn, num_active, nodemap, vnnmap, nodemap->nodes[j].pnn); }