From dfa7ce7b738103c0084c9ba678d1734e66e0554d Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Tue, 11 Dec 2012 15:43:36 +1100 Subject: [PATCH] recoverd: basic_failback() can call find_takeover_node() directly Instead of unassigning, looping back and depending on basic_allocate_unassigned. Signed-off-by: Martin Schwenke (This used to be ctdb commit 4dc08e37dec464c8785a2ddae15c7c69d3c81ac3) --- ctdb/server/ctdb_takeover.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ctdb/server/ctdb_takeover.c b/ctdb/server/ctdb_takeover.c index 412480e2260..bf12212c07d 100644 --- a/ctdb/server/ctdb_takeover.c +++ b/ctdb/server/ctdb_takeover.c @@ -1683,12 +1683,10 @@ static bool basic_failback(struct ctdb_context *ctdb, && (*retries < (num_ips + 5)) ){ struct ctdb_public_ip_list *tmp; - /* mark one of maxnode's vnn's as unassigned and try - again - */ + /* Reassign one of maxnode's VNNs */ for (tmp=all_ips;tmp;tmp=tmp->next) { if (tmp->pnn == maxnode) { - tmp->pnn = -1; + (void)find_takeover_node(ctdb, nodemap, mask, tmp, all_ips); (*retries)++; return true; }