]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mon/MgrMonitor: do not propse again for "mgr fail"
authorKefu Chai <tchaikov@gmail.com>
Sat, 27 Aug 2022 15:46:00 +0000 (23:46 +0800)
committerKefu Chai <tchaikov@gmail.com>
Sat, 27 Aug 2022 15:57:40 +0000 (23:57 +0800)
commit5b1c6ad4967196cb97afd8c04848b13ee5a198f0
treee55eedb620c953aea7040b2f7f0b14f155385c70
parent75d4ce7169efac7895e25e140e7a14387224022e
mon/MgrMonitor: do not propse again for "mgr fail"

in 23c3f76018b446fb77bbd71fdd33bddfbae9e06d, the change to fail the mgr
is proposed immediately. but `MgrMonitor::prepare_command()` method still
returns `true` in this case. its indirect caller of
`PaxosService::dispatch()` considers this as a sign that it needs to
propose the change with `propose_pending()`. but the pending change has
already been proposed by `MgrMonitor::prepare_command()`, and
`have_pending` is also cleared by this call. as we don't allow
consecutive paxos proposals, the second `propose_pending()` call is
delayed with a configured latency. but when the timer is fired, this
poseponed call would find itself trying to propose nothing. the change
to fail the mgr has been proposed. that's why we have
`ceph_assert(have_pending)` assertion failures.

in this change, the second proposal is not proposed anymore if the
proposal is proposed immediately. this should avoid the assertion
failure.

this change should address the regression introduced by
23c3f76018b446fb77bbd71fdd33bddfbae9e06d.

Fixes: https://tracker.ceph.com/issues/56850
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
src/mon/MgrMonitor.cc