ctdb-daemon: Drop special case handling for new IP already on interface
authorMartin Schwenke <martin@meltin.net>
Wed, 17 Aug 2016 04:43:05 +0000 (14:43 +1000)
committerMartin Schwenke <martins@samba.org>
Wed, 17 Aug 2016 21:00:26 +0000 (23:00 +0200)
The address may already be assigned to another node, so this is wrong.
It also leaves the interface unknown.

This is better left to code that handles rogue IP addresses.  A
takeover run should correctly takeover the address if it is assigned
to this node or release it if it is assigned to another node.  Coming
soon...

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/server/ctdb_takeover.c

index 3871799c77340884fdc03efa8d36a3360ac30b11..3421e21d7c84467919f1e5a1da0733fa470546a5 100644 (file)
@@ -1080,12 +1080,6 @@ static int ctdb_add_public_address(struct ctdb_context *ctdb,
        vnn->public_address      = *addr;
        vnn->public_netmask_bits = mask;
        vnn->pnn                 = -1;
-       if (check_address) {
-               if (ctdb_sys_have_ip(addr)) {
-                       DEBUG(DEBUG_ERR,("We are already hosting public address '%s'. setting PNN to ourself:%d\n", ctdb_addr_to_str(addr), ctdb->pnn));
-                       vnn->pnn = ctdb->pnn;
-               }
-       }
 
        for (i=0; vnn->ifaces[i]; i++) {
                ret = ctdb_add_local_iface(ctdb, vnn->ifaces[i]);