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)
committerMartin Schwenke <martin@meltin.net>
Mon, 6 May 2013 23:36:30 +0000 (09:36 +1000)
Dont call a full blown clusterwide ipreallocation,  just release it locally

(cherry picked from commit 9a806dec8687e2ec08a308853b61af6aed5e5d1e)

Conflicts:
server/ctdb_recoverd.c

server/ctdb_recoverd.c

index 336a9a793f9e64d5e63a9480207794adc919187a..8b1b517c41d0afd1b4774f3bb49858aa0bd5d235 100644 (file)
@@ -2621,9 +2621,13 @@ static int verify_local_ip_allocation(struct ctdb_context *ctdb, struct ctdb_rec
                                }
                        } else {
                                if (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"));
+                                       }
                                }
                        }
                }