Skip to content
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
merged 8 commits into from
May 5, 2021

Conversation

neha-ojha
Copy link
Member

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

* 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)
@yuriw yuriw merged commit d9cb829 into ceph:pacific May 5, 2021
@neha-ojha neha-ojha deleted the wip-49918-pacific branch May 7, 2021 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants