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
quincy: mds: fix stray evaluation using scrub and introduce new option #50815
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
Scrub could evaluate strays but there was a race condition where an inode pinned for scrub would land for purging which would indeed lead to crashes. Fixes: https://tracker.ceph.com/issues/51824 Signed-off-by: Dhairya Parmar <dparmar@redhat.com> (cherry picked from commit a8680d3)
it an inode is being purged, scrub should not be ran on it. Fixes: https://tracker.ceph.com/issues/51824 Signed-off-by: Dhairya Parmar <dparmar@redhat.com> (cherry picked from commit ce12cd7)
Running scrub at CephFS root doesn't iterate over ~mdsdir, this feature is needed but the cluster admin should have the liberty to decide whether to evaluate strays at root or not. Therefore a new option 'scrub_mdsdir' can be useful. Fixes: https://tracker.ceph.com/issues/53724 Signed-off-by: Dhairya Parmar <dparmar@redhat.com> (cherry picked from commit e65eb2b)
As enqueue_scrub is invoked twice to perform stray evaluation at root using new op scrub_mdsdir, tests fail as command scrub start / scrub_mdsdir would return two JSON object which JSONDecodeError cannot parse, this patch would make sure we do not dump JSON for recursive scrub on ~mdsdir than happens along with scrubbing root (only when using scrub_mdsdir op) Signed-off-by: Dhairya Parmar <dparmar@redhat.com> (cherry picked from commit 4a976b5)
Signed-off-by: Dhairya Parmar <dparmar@redhat.com> (cherry picked from commit c85347f)
and make sure it does not dispose JSON for recursive scrub on ~mdsdir while scrubbing with flag 'scrub_mdsdir' Signed-off-by: Dhairya Parmar <dparmar@redhat.com> (cherry picked from commit b32c572)
- test_stray_evaluation_with_scrub this assures that evaluating strays with scrub works fine and no crash is detected. - test_flag_scrub_mdsdir test the new flag to scrub ~mdsdir at CephFS root Fixes: https://tracker.ceph.com/issues/51824 Signed-off-by: Dhairya Parmar <dparmar@redhat.com> (cherry picked from commit 632c8b0)
Also documented the use of new flag introduced in this PR Fixes: https://tracker.ceph.com/issues/53724 Signed-off-by: Dhairya Parmar <dparmar@redhat.com> (cherry picked from commit d22e60f)
Signed-off-by: Dhairya Parmar <dparmar@redhat.com> (cherry picked from commit f654de9)
Put on hold, #50813 (comment) |
dparmar18
changed the title
quincy: mds: fix stray evaluation using scrub and introduce new option
[DNM] quincy: mds: fix stray evaluation using scrub and introduce new option
May 18, 2023
This would avoid the need to run individual scrubs for ~mdsdir and root, i.e. run both the scrubs under the same header, this also helps to avoid edge case where in case ~mdsdir is huge and it's taking time to scrub it, the scrub status would report something like this until root inodes kick in: { "status": "scrub active (757 inodes in the stack)", "scrubs": {} } Fixes: https://tracker.ceph.com/issues/59350 Signed-off-by: Dhairya Parmar <dparmar@redhat.com> (cherry picked from commit f85b228)
Previouly, two individual scrubs were initiated to scrub ~mdsdir at root where the ~mdsdir scrub wasn't provided any tag thus, it was necessary to not dump it's values for output of 'scrub start'. Now since mdsdir and root scrub run under single header, there is no need for this anymore, thus removing this redundant code. Fixes: https://tracker.ceph.com/issues/59350 Signed-off-by: Dhairya Parmar <dparmar@redhat.com> (cherry picked from commit 2f06fee)
Previously when ~mdsdir was scrubbed at CephFS root, it's header was kept empty, thus it became necessary to not dump it's values for 'scrub status'. Now since both the scrubs(~mdsdir and root) run under the same header, this code is no more needed. Fixes: https://tracker.ceph.com/issues/59350 Signed-off-by: Dhairya Parmar <dparmar@redhat.com> (cherry picked from commit 548af10)
Code has been changed, in order to scrub ~mdsdir at root, recursive flag also needs to be provided along with scrub_mdsdir. Fixes: https://tracker.ceph.com/issues/59350 Signed-off-by: Dhairya Parmar <dparmar@redhat.com> (cherry picked from commit e40ca40)
for mdsdir scrub at CephFS root. Fixes: https://tracker.ceph.com/issues/59350 Signed-off-by: Dhairya Parmar <dparmar@redhat.com> (cherry picked from commit 93dfc11)
Comment addressed in #51539, added its commits |
dparmar18
changed the title
[DNM] quincy: mds: fix stray evaluation using scrub and introduce new option
quincy: mds: fix stray evaluation using scrub and introduce new option
Jul 18, 2023
jenkins retest this please |
jenkins test api |
jenkins test make check |
batrick
approved these changes
Aug 17, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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/59262, https://tracker.ceph.com/issues/59265
Backport of #47649
Parent tracker: https://tracker.ceph.com/issues/53724, https://tracker.ceph.com/issues/51824
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. "pacific"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
Checklist
Show available Jenkins commands
jenkins retest this please
jenkins test classic perf
jenkins test crimson perf
jenkins test signed
jenkins test make check
jenkins test make check arm64
jenkins test submodules
jenkins test dashboard
jenkins test dashboard cephadm
jenkins test api
jenkins test docs
jenkins render docs
jenkins test ceph-volume all
jenkins test ceph-volume tox
jenkins test windows