ctdb-recovery: Simplify logging of recovery mode setting
authorAmitay Isaacs <amitay@gmail.com>
Thu, 22 Jun 2017 04:52:32 +0000 (14:52 +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

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

index ada31af8822b30a30205c3c38fc3e9b3d808798c..e35ba737ebab5b3829e35d58692da5b50c2c5286 100644 (file)
@@ -862,6 +862,9 @@ int32_t ctdb_control_set_recmode(struct ctdb_context *ctdb,
                return 0;
        }
 
+       D_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
        */
@@ -874,11 +877,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;