diff --git a/ctdb/server/ctdb_takeover_helper.c b/ctdb/server/ctdb_takeover_helper.c index af8656900e7..5efd6198394 100644 --- a/ctdb/server/ctdb_takeover_helper.c +++ b/ctdb/server/ctdb_takeover_helper.c @@ -301,6 +301,12 @@ static struct tevent_req *release_ip_send(TALLOC_CTX *mem_ctx, for (i = 0; i < count; i++) { uint32_t pnn = pnns[i]; + + /* Skip this node if IP is not known */ + if (! bitmap_query(tmp_ip->known_on, pnn)) { + continue; + } + /* If pnn is not the node that should be * hosting the IP then add it to the list of * nodes that need to do a release. */ diff --git a/ctdb/tests/takeover_helper/031.sh b/ctdb/tests/takeover_helper/031.sh index 435cd499d6f..13005ee538b 100755 --- a/ctdb/tests/takeover_helper/031.sh +++ b/ctdb/tests/takeover_helper/031.sh @@ -33,10 +33,10 @@ Fetched public IPs from node 2 10.0.0.33 -> 2 [+0] 10.0.0.31 -> 0 [+14884] 10.0.0.32 -> 2 [+16129] -RELEASE_IP 10.0.0.34 succeeded on 2 nodes -RELEASE_IP 10.0.0.33 succeeded on 2 nodes -RELEASE_IP 10.0.0.32 succeeded on 2 nodes -RELEASE_IP 10.0.0.31 succeeded on 2 nodes +RELEASE_IP 10.0.0.34 succeeded on 1 nodes +RELEASE_IP 10.0.0.33 succeeded on 1 nodes +RELEASE_IP 10.0.0.32 succeeded on 1 nodes +RELEASE_IP 10.0.0.31 succeeded on 1 nodes TAKEOVER_IP 10.0.0.34 succeeded on node 0 TAKEOVER_IP 10.0.0.33 succeeded on node 2 TAKEOVER_IP 10.0.0.32 succeeded on node 2