When adding an ip at runtime, it might not yet have an iface assigned to it, so ensur...
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Tue, 1 Jun 2010 06:22:48 +0000 (16:22 +1000)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Tue, 1 Jun 2010 06:22:48 +0000 (16:22 +1000)
server/ctdb_takeover.c

index e80e30328145a91275aad32254745329876d29ad..52db386d7fe8913bf74062a73227e0c20325ba44 100644 (file)
@@ -588,6 +588,11 @@ int32_t ctdb_control_takeover_ip(struct ctdb_context *ctdb,
                return -1;
        }
 
+       if (vnn->iface == NULL && vnn->pnn == -1 && have_ip && best_iface != NULL) {
+               DEBUG(DEBUG_ERR,("Taking over newly created ip\n"));
+               have_ip = false;
+       }
+
        if (vnn->iface == NULL && have_ip) {
                DEBUG(DEBUG_CRIT,(__location__ " takeoverip of IP %s is known to the kernel, "
                                  "but we have no interface assigned, has someone manually configured it?"