summaryrefslogtreecommitdiff
path: root/ctdb
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2015-06-11 15:49:25 +1000
committerAmitay Isaacs <amitay@samba.org>2015-07-01 04:18:28 +0200
commitb234ae0a900052b03ca22efab8fa1b9e11f44ecc (patch)
tree3f25cdf4bee11764d6019d75029ebd0bdd4d921a /ctdb
parent036c2a92438585ab6b99a22fcf67b67890c525f0 (diff)
downloadsamba-b234ae0a900052b03ca22efab8fa1b9e11f44ecc.tar.gz
ctdb-recoverd: Clear IP assignment tree on election loss
If a node was previously recovery master (say, 20 years ago) and it becomes recovery master again then, if IP assignments have changed, verify_remote_ip_allocation() can produce messages like the following when called during recovery: ctdbd: recoverd:Inconsistent IP allocation - node 0 thinks 10.1.1.1 is held by node 0 while it is assigned to node 1 When a node loses an election it should clear all data specific to it being the recovery master. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb')
-rw-r--r--ctdb/server/ctdb_recoverd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ctdb/server/ctdb_recoverd.c b/ctdb/server/ctdb_recoverd.c
index 3a090b0f1b1..be53de615f7 100644
--- a/ctdb/server/ctdb_recoverd.c
+++ b/ctdb/server/ctdb_recoverd.c
@@ -2682,6 +2682,8 @@ static void election_handler(struct ctdb_context *ctdb, uint64_t srvid,
unban_all_nodes(ctdb);
}
+ clear_ip_assignment_tree(ctdb);
+
/* ok, let that guy become recmaster then */
ret = ctdb_ctrl_setrecmaster(ctdb, CONTROL_TIMEOUT(), ctdb_get_pnn(ctdb), em->pnn);
if (ret != 0) {