Repository navigation
osd/OSD: introduce reset_purged_snaps_last - #53579
Conversation
athanatos
left a comment
There was a problem hiding this comment.
Yep, this seems like a reasonable fix.
|
Oh, if the monitors have already trimmed maps (and, in general, they will have), do the mons send all purged snaps anyway? |
Yes, mon's |
2d0b918 to
3d6f7d1
Compare
There was a thread on the dev list recently where this came up [1]. Ignore the rbd-mirror discussion there -- it was only tangentially related. I'm linking it to highlight that we seem to have recurring issues in the snapshot trimming area: OSDs aren't picking up purged snap IDs from the monitors [2], monitor db growing many millions of osd_snap/purged_snap_ key which causes monitor startup slowness, etc. Manually resetting [1] https://lists.ceph.io/hyperkitty/list/[email protected]/message/UOJG46YXTIPOXJUSELIN42ATAD5FPMDY/ |
|
We should be able to backport this, so ticket + |
3d6f7d1 to
cc42cbf
Compare
Thanks for sharing the thread. |
Sounds good. What is in scope of this PR is the issue of OSDs not picking up purged snap IDs from the monitors under normal operation. Do we know what is causing that? |
0b09309 to
f410422
Compare
Not yet. This issue was never reported (AFAIK) and this PR is proposed specifically to address the single known instance of it. |
When the OSD preboots it sends a MMonGetPurgedSnaps message to the monitor (`_get_purged_snaps`). The monitor will reply with all the purged snapshots that their purged_epoch_ is in the range of superblock.purged_snaps_last + 1 up to the last superblock.current_epoch + 1. When the OSD will handle the reply from the mon (`handle_get_purged_snaps_reply`) it will call `record_purged_snaps` to write those purged snapshots in the OSD store as well (PSN_ keys). Once purged_snaps_last is reset, in the following OSD reboot, the snapshots that were marked as purged (purged_snaps_ keys) in the mon's store will be also marked, correspondingly, in the OSD store. That way `scrub_purged_snaps` will be able to re-trim the snapshots that weren't marked as purged in the OSD side (for some reason) Fixes: https://tracker.ceph.com/issues/62981 Signed-off-by: Matan Breizman <[email protected]>
f410422 to
120ed0f
Compare
I think I saw at least one more report but I can't find it right now. It was a small test cluster suffering from other issues too, so it ended up just being recreated. |
|
@rzarzynski, what is you opinion regarding merging this since it's only called on command? Do you prefer adding the command to the thrash tests as a sanity check? |
|
@Matan-B It seems pretty simple to add it to the thrashing test, so I think we should. A command tested in teuthology is vastly easier to recommend to a user than one that isn't. |
cb23d25 to
a896027
Compare
Signed-off-by: Matan Breizman <[email protected]>
a896027 to
680e088
Compare
|
@rzarzynski, tests look good. |
|
jenkins test windows |
|
jenkins test make check arm64 |
athanatos
left a comment
There was a problem hiding this comment.
Seems good to merge to me once the checks pass.
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 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 windows