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)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Wed, 20 Jun 2012 05:10:05 +0000 (15:10 +1000)
Dont call a full blown clusterwide ipreallocation,  just release it locally

server/ctdb_recoverd.c

index b3807464f3b7bfa60baac355bf17d691bb43773e..7b7435cc050b8da8bb20deda2ce3bba18a1bb8ad 100644 (file)
@@ -2864,9 +2864,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"));
+                                       }
                                }
                        }
                }