summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2013-04-05 13:34:06 +1100
committerAmitay Isaacs <amitay@gmail.com>2013-04-08 11:14:32 +1000
commit77a29b37334b9df62b755b6f538fb975e105e1ff (patch)
treeeead16c30172bd41dc506007cdd65ba0e4c47b44
parentd931e73fb83fe1ced9c41b06c15060fd18aff3d7 (diff)
downloadsamba-77a29b37334b9df62b755b6f538fb975e105e1ff.tar.gz
samba-77a29b37334b9df62b755b6f538fb975e105e1ff.tar.xz
samba-77a29b37334b9df62b755b6f538fb975e105e1ff.zip
recoverd/takeover: Use IP->node mapping info from nodes hosting that IP
When collating IP information for IP layout, only trust the nodes that are hosting an IP, to have correct information about that IP. Ignore what all the other nodes think. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 1c7adbccc69ac276d2b957ad16c3802fdb8868ca)
-rw-r--r--ctdb/server/ctdb_takeover.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/ctdb/server/ctdb_takeover.c b/ctdb/server/ctdb_takeover.c
index d601b17148..48704bda1c 100644
--- a/ctdb/server/ctdb_takeover.c
+++ b/ctdb/server/ctdb_takeover.c
@@ -1463,7 +1463,13 @@ create_merged_ip_list(struct ctdb_context *ctdb)
tmp_ip = talloc_zero(ctdb->ip_tree, struct ctdb_public_ip_list);
CTDB_NO_MEMORY_NULL(ctdb, tmp_ip);
- tmp_ip->pnn = public_ips->ips[j].pnn;
+ /* Do not use information about IP addresses hosted
+ * on other nodes, it may not be accurate */
+ if (public_ips->ips[j].pnn == ctdb->nodes[i]->pnn) {
+ tmp_ip->pnn = public_ips->ips[j].pnn;
+ } else {
+ tmp_ip->pnn = -1;
+ }
tmp_ip->addr = public_ips->ips[j].addr;
tmp_ip->next = NULL;