mirror of
https://github.com/ceph/ceph
synced 2025-02-24 03:27:10 +00:00
mon: Elector: clean ack set on election start
We should never consider old 'acks' from monitors on a new election. We usually do it, but we didn't if an election expired, because this code didn't foresee the possibility of monitors changing ranks in-between elections -- which doesn't happen if we specify the monmap during the monitor's mkfs, but may happen when relying on 'mon initial peers'. Failing to do so triggered an assertion after fixing bug #3252. Backport: argonaut Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com> Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
parent
35f5effa73
commit
d5c3c47619
@ -67,6 +67,8 @@ void Elector::start()
|
||||
return;
|
||||
}
|
||||
dout(5) << "start -- can i be leader?" << dendl;
|
||||
|
||||
acked_me.clear();
|
||||
|
||||
// start by trying to elect me
|
||||
if (epoch % 2 == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user