This avoids confusing log messages like:
ctdbd[21635]: releaseip called for an ip '10.1.1.1' that is not a public address
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Fri Feb 24 11:50:36 CET 2017 on sn-devel-144
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. */
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