]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-recovery: Do not run local ip verification when in recovery
authorAmitay Isaacs <amitay@gmail.com>
Thu, 22 Jun 2017 06:15:47 +0000 (16:15 +1000)
committerMartin Schwenke <martins@samba.org>
Sat, 24 Jun 2017 08:28:21 +0000 (10:28 +0200)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12857

If we drop public IPs because CTDB is in recovery for too long, then
avoid spamming logs "Trigger takeoverrun" every second.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
ctdb/server/ctdb_recoverd.c

index 35b8d4248ffc64148519df000504a108d87ef59d..84710001c3683ed8508d13926976a23d7e77080c 100644 (file)
@@ -2670,9 +2670,11 @@ static void main_loop(struct ctdb_context *ctdb, struct ctdb_recoverd *rec,
                return;
        }
 
-       /* Check if an IP takeover run is needed and trigger one if
-        * necessary */
-       verify_local_ip_allocation(ctdb, rec, pnn, nodemap);
+       if (ctdb->recovery_mode == CTDB_RECOVERY_NORMAL) {
+               /* Check if an IP takeover run is needed and trigger one if
+                * necessary */
+               verify_local_ip_allocation(ctdb, rec, pnn, nodemap);
+       }
 
        /* if we are not the recmaster then we do not need to check
           if recovery is needed