]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
when a ctdb_takeover_run has failed we must make sure that
authorRonnie Sahlberg <sahlberg@ronnie>
Thu, 13 Sep 2007 04:51:37 +0000 (14:51 +1000)
committerRonnie Sahlberg <sahlberg@ronnie>
Thu, 13 Sep 2007 04:51:37 +0000 (14:51 +1000)
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)

ctdb/server/ctdb_recoverd.c

index 82d6f14a4b887617d773b0869587e40313541b2f..c39cfda68d1a6b4ecf9d18b61c10a11bbd303b08 100644 (file)
@@ -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);
                }