ctdb-recoverd: Consistently log start of election
authorMartin Schwenke <martin@meltin.net>
Sat, 22 Jan 2022 19:21:51 +0000 (06:21 +1100)
committerAmitay Isaacs <amitay@samba.org>
Mon, 14 Feb 2022 01:47:31 +0000 (01:47 +0000)
Elections should now be quite rare, so always log when one begins.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14958

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

index 820bb6276944139cb7800639c7a24cd6ce988a6b..03698ef2928b0dc2b35ae85b7ed199f34321b26c 100644 (file)
@@ -1867,7 +1867,7 @@ static void force_election(struct ctdb_recoverd *rec)
        int ret;
        struct ctdb_context *ctdb = rec->ctdb;
 
-       DEBUG(DEBUG_INFO,(__location__ " Force an election\n"));
+       D_ERR("Start election\n");
 
        /* set all nodes to recovery mode to stop all internode traffic */
        ret = set_recovery_mode(ctdb, rec, rec->nodemap, CTDB_RECOVERY_ACTIVE);
@@ -1978,7 +1978,8 @@ static void leader_broadcast_timeout_handler(struct tevent_context *ev,
 
        rec->leader_broadcast_timeout_te = NULL;
 
-       D_NOTICE("Leader broadcast timeout. Force election\n");
+       D_NOTICE("Leader broadcast timeout\n");
+
        force_election(rec);
 }