During election, there shouldn't be any leader. This change makes sure that a server in candidate role always report leader as "unknown".
Signed-off-by: Han Zhou <hz...@ovn.org> --- ovsdb/raft.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ovsdb/raft.c b/ovsdb/raft.c index 2e1144c..1717ccc 100644 --- a/ovsdb/raft.c +++ b/ovsdb/raft.c @@ -1643,6 +1643,7 @@ raft_start_election(struct raft *raft, bool leadership_transfer) ovs_assert(raft->role != RAFT_LEADER); + raft->leader_sid = UUID_ZERO; raft->role = RAFT_CANDIDATE; /* If there was no leader elected since last election, we know we are * retrying now. */ -- 2.1.0 _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev