-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pacific: mon/OSDMonitor: drop stale failure_info after a grace period #41090
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* early return if routed request is not found in routed_requests. reduce the indent level, for better readability. * do not look up the request twice. for better performance. * use unique_ptr<> for holding the request, for better readability Signed-off-by: Kefu Chai <kchai@redhat.com> (cherry picked from commit 164ff62)
we always return "no_op" message to proxy monitor in `OSDMonitor::prepare_failure()` at the very beginning of this method. so no need to reply the peon again when discarding the failure report. Signed-off-by: Kefu Chai <kchai@redhat.com> (cherry picked from commit 062a385)
there is no need to return stale report, as the caller is not interested in it. Signed-off-by: Kefu Chai <kchai@redhat.com> (cherry picked from commit 09216c0)
for better readability Signed-off-by: Kefu Chai <kchai@redhat.com> (cherry picked from commit d42815d)
will add a trim failures call in the loop, which mutates failure_info, while we are still iterating this map. so have to restructure the loop a little bit. Fixes: https://tracker.ceph.com/issues/47380 Signed-off-by: Kefu Chai <kchai@redhat.com> (cherry picked from commit 6e512b2)
failure_info keeps strong references of the MOSDFailure messages sent by osd or peon monitors, whenever monitor starts to handle an MOSDFailure message, it registers it in its OpTracker. and the failure report messageis unregistered when monitor acks them by either canceling them or replying the reporters with a new osdmap marking the target osd down. but if this does not happen, the failure reports just pile up in OpTracker. and monitor considers them as slow ops. and they are reported as SLOW_OPS health warning. in theory, it does not take long to mark an unresponsive osd down if we have enough reporters. but there is chance, that a reporter fails to cancel its report before it reboots, and the monitor also fails to collect enough reports and mark the target osd down. so the target osd never gets an osdmap marking it down, so it won't send an alive message to monitor to fix this. in this change, we check for the stale failure info in tick(), and simply drop the stale reports. so the messages can released and marked "done". Fixes: https://tracker.ceph.com/issues/47380 Signed-off-by: Kefu Chai <kchai@redhat.com> (cherry picked from commit a124ee8)
just for more const correctness. Signed-off-by: Kefu Chai <kchai@redhat.com> (cherry picked from commit 253cb8f)
no need to keep it in the pending list anymore. Signed-off-by: Kefu Chai <kchai@redhat.com> (cherry picked from commit ff077fc)
jdurgin
approved these changes
Apr 30, 2021
tchaikov
approved these changes
May 2, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
backport tracker: https://tracker.ceph.com/issues/49918
backport of #40033
parent tracker: https://tracker.ceph.com/issues/47380
this backport was staged using ceph-backport.sh version 16.0.0.6848
find the latest version at https://github.com/ceph/ceph/blob/master/src/script/ceph-backport.sh