]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mon/ElectionLogic: tie-breaker ignore proposal from marked down mon
authorKamoltat <ksirivad@redhat.com>
Thu, 13 Jun 2024 16:17:53 +0000 (16:17 +0000)
committerKamoltat <ksirivad@redhat.com>
Wed, 26 Jun 2024 15:21:13 +0000 (15:21 +0000)
commitd3608533672d575fbc54fc965ddde93dfdb89721
tree4648d7f99fa55e5935456baaf6f5175c1bf52384
parent6fc28857ad572d05bfdf6f9549d921642b4c8698
mon/ElectionLogic: tie-breaker ignore proposal from marked down mon

Problem:

Monitor election gets stuck,
resulting in the cluster being
unaccessible.

Set up stretch cluster:
DC1: mon.a,mon.b
DC2: mon.c, mon.d
Arbiter: mon.e

Apply netsplit between
DC1 and DC2, wait around
10 seconds, client tried accessing
the cluster ... failed to access.

We expect the cluster to be functional
when there is netsplit.

This was due to how we suppose to
kick one DC out of quorum and keep them in the
dark until the connection comes back (netsplit gone).
However, there is a small window where the out-of-quorum
DC is able to have an influence on the tiebreaker MON
by forcing the tiebreaker MON to bump its epoch
which then it will reject the winner MON's victory
message from in-quorum DC.

Solution:
In CONNECTIVITY election strategy,
tie-breaker MON disregard any proposal that is coming
from MONs that belongs to `stretch_marked_down_mons`
set. As a result, the out-of-quorum
MONs won't get the chance to force the tie-breaker
MON to increase its epoch, hence will now accept
the victory message from the in-quorum Monitors.

Also, edited src/test/mon/test_election.cc
to include `is_stretch_marked_down_mon`
and `is_tiebreaker`,
preventing the make check from breaking.

Fixes: https://tracker.ceph.com/issues/66471
Signed-off-by: Kamoltat <ksirivad@redhat.com>
src/mon/ElectionLogic.cc
src/mon/ElectionLogic.h
src/mon/Elector.cc
src/mon/Elector.h
src/mon/MonMap.h
src/test/mon/test_election.cc