When we find an ip we shouldnt host, just release it
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Wed, 20 Jun 2012 05:10:05 +0000 (15:10 +1000)
committerMichael Adam <obnox@samba.org>
Fri, 6 Jun 2014 13:00:40 +0000 (15:00 +0200)
Dont call a full blown clusterwide ipreallocation,  just release it locally
(cherry picked from commit 9a806dec8687e2ec08a308853b61af6aed5e5d1e)

server/ctdb_recoverd.c

index 088a62a3f2541578e62ec600559e853c1a402c1e..45d387d6e4e0d1c12fc6a064e2191f3044de96bb 100644 (file)
@@ -2589,9 +2589,13 @@ static int verify_local_ip_allocation(struct ctdb_context *ctdb, struct ctdb_rec
                                }
                        } else {
                                if (ctdb->do_checkpublicip && ctdb_sys_have_ip(&ips->ips[j].addr)) {
-                                       DEBUG(DEBUG_CRIT,("We are still serving a public address '%s' that we should not be serving.\n", 
+
+                                       DEBUG(DEBUG_CRIT,("We are still serving a public address '%s' that we should not be serving. Removing it.\n", 
                                                ctdb_addr_to_str(&ips->ips[j].addr)));
-                                       need_takeover_run = true;
+
+                                       if (ctdb_ctrl_release_ip(ctdb, CONTROL_TIMEOUT(), CTDB_CURRENT_NODE, &ips->ips[j]) != 0) {
+                                               DEBUG(DEBUG_ERR,("Failed to release local ip address\n"));
+                                       }
                                }
                        }
                }