Repository navigation
mon: Track and process pending pings after election - #62416
Conversation
|
jenkins test make check |
|
jenkins test api |
rzarzynski
left a comment
There was a problem hiding this comment.
Basically LGTM, just one question.
1842df7 to
e9dd755
Compare
|
@rzarzynski Just pushed the new changes |
|
jenkins test make check arm64 |
| peer_acked_ping[prank] = m->stamp; | ||
| } else{ | ||
| dout(20) << "m->stamp <= previous_acked .. we don't report_live_connection" << dendl; | ||
| } else { |
| // Check if quorum feature is not set and we are in | ||
| // STATE_INIT, STATE_PROBING, STATE_SYNCHRONIZING or STATE_ELECTING | ||
| if (mon->get_quorum_mon_features().empty() && | ||
| (!mon->is_leader() && !mon->is_peon() && !mon->is_shutdown())) { |
|
@gregsfortytwo: do you want to take the final look before merging? |
|
think we can just qa this @rzarzynski |
Problem: Monitors stop pinging each other when quorum_mon_feature flag is empty. This happens when the monitor freshly starts up and never formed a quorum before, or when you restart the monitors in the cluster. Basically, Monitor startups. This problem can easily be reproduced everytime. Steps to reproduce: 1. Start 3 MONs with `connectivity` election strategy 2. Fail 1 mon. 3. Restart all the monitors (including the down monitor) 4. Observe that the connection scores of each monitor will tell you that not all monitors are alive. Which is not true because all 3 Monitors are in quorum. What happened was during monitor startups, quorum_mon_feature is empty and although they all participated in the election, when they hit the function begin_peer_ping, some monitors if not all will not send ping because of the emptry quorum_mon_feature flag. Therefore, after the election the monitors will have the wrong connection score. However, this will get resolved in the next election because now that quorum_mon_feature is populated they will start pinging each other again, hence, correct connectivity score. Solution: In begin_peer_ping, instead of just returning out of the function when quorum_mon_feature is empty, we keep track of the peers that we should ping once the election is finished. In Monitor::win_election and Monitor::lose_elections, we process the pending pings by calling begin_peer_ping on each of the peers (both peons and leader) Additionally: Improved loggings in Elector class such that debugging the pinging process gets easier. Fixes: https://tracker.ceph.com/issues/70587 Signed-off-by: Kamoltat Sirivadhna <[email protected]> sd Signed-off-by: Kamoltat Sirivadhna <[email protected]>
e9dd755 to
eadcb8c
Compare
|
jenkins test make check |
|
This seems fine at a glance, but I’m surprised that it makes the net split detection work by getting scores going more quickly. I guess the real fix is because this makes sure all the monitors are in the active pinging state before a monitor election finishes, so they default to looking connected instead of unconnected on first check? |
Hi @gregsfortytwo, After going through the Monitor code, I found that The net split detection PR will report a false positive on the election that Therefore, after we established leaders/peon and just before we call |
|
jenkins test make check |
|
jenkins test make check arm64 |
Oh wow, I would have expected them to start pinging once the election finished. Guess that got missed. |
|
@gregsfortytwo does this have your approval? |
LGTM |
NOTE:
#59248 is dependent on this PR as it uses the connection score feature and this PR solves some of the issues related to connection scores.
Problem:
Monitors stop pinging each other when quorum_mon_feature flag is empty. This happens when the monitor freshly starts up and never formed a quorum before, or when you restart the monitors in the cluster. Basically, Monitor startups.
This problem can easily be reproduced everytime.
Steps to reproduce:
connectivityelection strategyWhat happened was during monitor startups,
quorum_mon_feature is empty and although
they all participated in the election,
when they hit the function begin_peer_ping,
some monitors if not all will not send ping
because of the emptry quorum_mon_feature flag.
Therefore, after the election the monitors will
have the wrong connection score. However,
this will get resolved in the next election
because now that quorum_mon_feature is populated
they will start pinging each other again, hence,
correct connectivity score.
Although the next election will resolve the bad scores,
this will impact features like Netsplit detection because
it relies on connectivity scores and the last thing we want to
do is report false positives to the user.
Solution:
In begin_peer_ping, instead of just returning out of the function when quorum_mon_feature is empty, we
keep track of the peers that we should ping once
the election is finished. In Monitor::win_election we process the pending pings by calling begin_peer_ping on each of the peers.
Additionally:
Improved loggings in Elector class such
that debugging the pinging process gets easier.
Fixes: https://tracker.ceph.com/issues/70587
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 test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job Definition