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)
committerMichael Adam <obnox@samba.org>
Fri, 6 Jun 2014 13:00:37 +0000 (15:00 +0200)
(cherry picked from commit 2d60f96680d16c2992e2a35517822f88c12538b7)

server/ctdb_takeover.c

index 75f0d71647669d3fcbf5c4066e2d7604088b2dbc..2616955e113e90e23397e20239645d7d51077f6a 100644 (file)
@@ -596,6 +596,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?"