]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-recovery: Simplify logging of recovery mode setting
authorAmitay Isaacs <amitay@gmail.com>
Thu, 22 Jun 2017 04:52:32 +0000 (14:52 +1000)
committerKarolin Seeger <kseeger@samba.org>
Mon, 26 Jun 2017 10:34:22 +0000 (12:34 +0200)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12857

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
(cherry picked from commit d74dadd7f26a9e8c48ba92468d7d0c4a7aa5a8e5)

ctdb/server/ctdb_recover.c

index 410117a557b9818d01177d2f50b132fdbb40c481..08eb5c9fef13b2c0d31eebd2c0c7267d904123e5 100644 (file)
@@ -863,6 +863,10 @@ int32_t ctdb_control_set_recmode(struct ctdb_context *ctdb,
                return 0;
        }
 
+       DEBUG(DEBUG_NOTICE,
+             ("Recovery mode set to %s\n",
+              recmode == CTDB_RECOVERY_NORMAL ? "NORMAL" : "ACTIVE"));
+
        /* if we enter recovery but stay in recovery for too long
           we will eventually drop all our ip addresses
        */
@@ -875,11 +879,6 @@ int32_t ctdb_control_set_recmode(struct ctdb_context *ctdb,
                }
        }
 
-       if (recmode != ctdb->recovery_mode) {
-               DEBUG(DEBUG_NOTICE,(__location__ " Recovery mode set to %s\n", 
-                        recmode==CTDB_RECOVERY_NORMAL?"NORMAL":"ACTIVE"));
-       }
-
        if (recmode != CTDB_RECOVERY_NORMAL ||
            ctdb->recovery_mode != CTDB_RECOVERY_ACTIVE) {
                ctdb->recovery_mode = recmode;