From: Amitay Isaacs Date: Thu, 22 Jun 2017 04:52:32 +0000 (+1000) Subject: ctdb-recovery: Simplify logging of recovery mode setting X-Git-Tag: samba-4.5.11~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=40cc8d2b71867e4316472d531502610672f5c98a;p=thirdparty%2Fsamba.git ctdb-recovery: Simplify logging of recovery mode setting BUG: https://bugzilla.samba.org/show_bug.cgi?id=12857 Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke (cherry picked from commit d74dadd7f26a9e8c48ba92468d7d0c4a7aa5a8e5) --- diff --git a/ctdb/server/ctdb_recover.c b/ctdb/server/ctdb_recover.c index 410117a557b..08eb5c9fef1 100644 --- a/ctdb/server/ctdb_recover.c +++ b/ctdb/server/ctdb_recover.c @@ -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;