1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-21 18:04:06 +03:00

ctdb-recoverd: Always send unknown leader broadcast when starting election

This is currently missed when the cluster lock is lost.

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>
This commit is contained in:
Martin Schwenke 2022-01-23 06:18:51 +11:00 committed by Amitay Isaacs
parent 9b3fab052b
commit bf55a0117d

View File

@ -1877,6 +1877,8 @@ static void force_election(struct ctdb_recoverd *rec)
}
rec->election_in_progress = true;
/* Let other nodes know that an election is underway */
leader_broadcast_send(rec, CTDB_UNKNOWN_PNN);
if (cluster_lock_enabled(rec)) {
cluster_lock_election(rec);
@ -1976,9 +1978,6 @@ static void leader_broadcast_timeout_handler(struct tevent_context *ev,
rec->leader_broadcast_timeout_te = NULL;
/* Let other nodes know that an election is underway */
leader_broadcast_send(rec, CTDB_UNKNOWN_PNN);
D_NOTICE("Leader broadcast timeout. Force election\n");
force_election(rec);
}