Repository navigation
mon/ElectionLogic: tie-breaker mon ignore proposal from marked down mon - #57906
Conversation
eac35df to
6e3baa8
Compare
6e3baa8 to
928f878
Compare
|
make check failed: |
gregsfortytwo
left a comment
There was a problem hiding this comment.
This seems broken: if a monitor is marked down in stretch mode, and we ignore all proposals from it, how can a monitor stop being marked down?
There was a problem hiding this comment.
This is supposed to be handled a few blocks below
// drop this message; it won't change our vote so we defer to leader
Why didn't that work?
There was a problem hiding this comment.
Hi @gregsfortytwo ,
So it didn't work because there is a scenario where out-of-quorum and in-quorum mon are all both in electing state, this is due to monmap change. Therefore, in this check:
if ((epoch % 2 == 0) &&
last_election_winner != elector->get_my_rank() &&
!elector->is_current_member(from))
We wouldn't go in because epoch % 2 != 0 since it is in electing state, therefore this allows the out of quorum mon to bump the epoch of the tiebreaker mon (in quorum) since we will continue down to
if (mepoch > epoch) {
ldout(cct, 20) << "mepoch > epoch" << dendl;
connectivity_bump_epoch_in_election(mepoch);
For a full explanation with log evidence, go to Logs analysis on a failed test section: https://docs.google.com/document/d/1YW7RKTUlMw2nxB9vzg_7Dp32i0Tf7i1WOt6gvyZOV-g/edit
There was a problem hiding this comment.
Let's be careful with our language here: if we are electing, there is no quorum right now. :)
But that explanation makes sense.
|
Yes at the time of this comment, the solution is yet to work properly, I have an idea that we can make the check exclusive to only a tiebreaker monitor, which means it will deal with the corner case mentioned in the PR and won't block other the monitors that have been marked down from being marked back up when netsplit stops and it can reach the |
928f878 to
b5176fc
Compare
|
New solution (check exclusive to only a tiebreaker monitor) tested 1/1 Passed: https://pulpito.ceph.com/ksirivad-2024-06-20_14:57:56-netsplit-wip-ksirivad-stretch-mode-netsplit-test-distro-default-smithi/ waiting on another test with 10 Jobs, lets see if it passes all 10 |
|
https://pulpito.ceph.com/ksirivad-2024-06-20_19:53:32-netsplit-wip-ksirivad-stretch-mode-netsplit-test-distro-default-smithi/ |
|
@gregsfortytwo please re-review my solution thanks! Here is a detailed log analysis of now why the solution now work, please see section: Tested Solution iteration 2 (Success Analysis) in https://docs.google.com/document/d/1YW7RKTUlMw2nxB9vzg_7Dp32i0Tf7i1WOt6gvyZOV-g/edit#heading=h.gfha0kk53jkp |
b5176fc to
b355a01
Compare
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 <[email protected]>
Test netsplit between 2 datacenters in a stretch mode cluster. Observe if: - PGs are active - Cluster is accessible - Writes and Reads went through Signed-off-by: Kamoltat <[email protected]>
b355a01 to
7a90d9d
Compare
gregsfortytwo
left a comment
There was a problem hiding this comment.
Reviewed-by: Greg Farnum [email protected]
This feels a little icky to me, I think because I don't like keeping monitors out at this part of the process. But the tiebreaker is indeed special, and constrained, and this solution nicely maps onto that by keeping the tiebreaker from changing its mind erratically, and by forcing net split DCs to connect to each other before merging them back in.
|
Thank you for your review Greg :) |
|
jenkins test make check |
To view full analysis here:
https://docs.google.com/document/d/1YW7RKTUlMw2nxB9vzg_7Dp32i0Tf7i1WOt6gvyZOV-g/edit?usp=sharing
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_monsset. 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.
Fixes: https://tracker.ceph.com/issues/66471
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windowsjenkins test rook e2e