recoverd: Fix spurious warnings when running with --nopublicipcheck
authorAmitay Isaacs <amitay@gmail.com>
Wed, 4 Apr 2012 04:42:23 +0000 (14:42 +1000)
committerMichael Adam <obnox@samba.org>
Fri, 6 Jun 2014 13:00:39 +0000 (15:00 +0200)
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit 7f8096f56d8274151705ac822b582d972078f8fe)

server/ctdb_recoverd.c

index bc7a7ae23a4695eeeb5a08ff2a7d1770debfe005..088a62a3f2541578e62ec600559e853c1a402c1e 100644 (file)
@@ -2582,13 +2582,13 @@ static int verify_local_ip_allocation(struct ctdb_context *ctdb, struct ctdb_rec
                                                ctdb_addr_to_str(&ips->ips[j].addr)));
                                need_takeover_run = true;
                        } else if (ips->ips[j].pnn == pnn) {
-                               if (!ctdb_sys_have_ip(&ips->ips[j].addr)) {
+                               if (ctdb->do_checkpublicip && !ctdb_sys_have_ip(&ips->ips[j].addr)) {
                                        DEBUG(DEBUG_CRIT,("Public address '%s' is missing and we should serve this ip\n",
                                                ctdb_addr_to_str(&ips->ips[j].addr)));
                                        need_takeover_run = true;
                                }
                        } else {
-                               if (ctdb_sys_have_ip(&ips->ips[j].addr)) {
+                               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", 
                                                ctdb_addr_to_str(&ips->ips[j].addr)));
                                        need_takeover_run = true;