mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
recoverd: avoid triggering a full recovery if just some ip allocation
has failed. We dont need to rebuild the databases in this situation, we just need to try again to sort out the ip address allocations. (This used to be ctdb commit 044c398ffea23d36ee033c8ddf07d11028197346)
This commit is contained in:
parent
c4006ce844
commit
d236c970d0
@ -1626,13 +1626,14 @@ static int do_recovery(struct ctdb_recoverd *rec,
|
||||
if (ret != 0) {
|
||||
DEBUG(DEBUG_ERR,("Failed to read public ips from remote node %d\n",
|
||||
culprit));
|
||||
rec->need_takeover_run = true;
|
||||
return -1;
|
||||
}
|
||||
rec->need_takeover_run = false;
|
||||
ret = ctdb_takeover_run(ctdb, nodemap);
|
||||
if (ret != 0) {
|
||||
DEBUG(DEBUG_ERR, (__location__ " Unable to setup public takeover addresses\n"));
|
||||
return -1;
|
||||
DEBUG(DEBUG_ERR, (__location__ " Unable to setup public takeover addresses. ctdb_takeover_run() failed.\n"));
|
||||
rec->need_takeover_run = true;
|
||||
}
|
||||
DEBUG(DEBUG_NOTICE, (__location__ " Recovery - takeip finished\n"));
|
||||
|
||||
@ -2047,8 +2048,7 @@ static void process_ipreallocate_requests(struct ctdb_context *ctdb, struct ctdb
|
||||
if (ret == 0) {
|
||||
ret = ctdb_takeover_run(ctdb, rec->nodemap);
|
||||
if (ret != 0) {
|
||||
DEBUG(DEBUG_ERR,("Failed to read public ips from remote node %d\n",
|
||||
culprit));
|
||||
DEBUG(DEBUG_ERR,("Failed to reallocate addresses: ctdb_takeover_run() failed.\n"));
|
||||
rec->need_takeover_run = true;
|
||||
}
|
||||
}
|
||||
@ -3400,8 +3400,7 @@ static void main_loop(struct ctdb_context *ctdb, struct ctdb_recoverd *rec,
|
||||
if (ret != 0) {
|
||||
DEBUG(DEBUG_ERR,("Failed to read public ips from remote node %d\n",
|
||||
culprit));
|
||||
ctdb_set_culprit(rec, culprit);
|
||||
do_recovery(rec, mem_ctx, pnn, nodemap, vnnmap);
|
||||
rec->need_takeover_run = true;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -3416,9 +3415,7 @@ static void main_loop(struct ctdb_context *ctdb, struct ctdb_recoverd *rec,
|
||||
|
||||
ret = ctdb_takeover_run(ctdb, nodemap);
|
||||
if (ret != 0) {
|
||||
DEBUG(DEBUG_ERR, (__location__ " Unable to setup public takeover addresses - starting recovery\n"));
|
||||
ctdb_set_culprit(rec, ctdb->pnn);
|
||||
do_recovery(rec, mem_ctx, pnn, nodemap, vnnmap);
|
||||
DEBUG(DEBUG_ERR, (__location__ " Unable to setup public takeover addresses. Try again later\n"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user