Repository navigation
tentacle: osd/SnapMapper: fix SnapMapper::Scrubber shard parsing - #73806
Merged
Merged
Conversation
Note: the following only applies to EC pools as replicated pools have no shard in the SNA_ keys. Note: The Scrubber is only responsible for clearing entries that (_for some anomalous reason_) remained in the store and should have been purged. SnapMapper::Scrubber::_parse_m is using the wrong key format (See: napMapper::get_prefix) to obtain the pg shard. While the correct format in EC pgs is: <MAPPING_PREFIX><pool>_<snapid>_.<shardid>_<hobject_t::to_str()> *******************************^ Or in replicated case: <MAPPING_PREFIX><pool>_<snapid>_<hobject_t::to_str()> *******************************^ The Scrubber is parsing the key a `.` instead of `_`. --- `sscanf` should return the 3 if the third parameter (shard) was successfully parsed. Otherwise, we assume no shard is present in this key. Fixes: https://tracker.ceph.com/issues/73018 Signed-off-by: ethanwu <[email protected]> (cherry picked from commit 9dda7af)
Signed-off-by: Matan Breizman <[email protected]> (cherry picked from commit 1de607b)
Contributor
Author
|
/audit retest |
|
🔄 Audit Retest Triggered by @ronen-fr. |
rzarzynski
approved these changes
Nov 12, 2026
Contributor
|
This PR has been added to wip-bharath31-testing-20261114.234838-tentacle. |
Contributor
Author
This file contains hidden or 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
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.
This is a backport of [email protected] fix to the SnapMapper.
Also included is a documentation fix by [email protected].
Fixes: https://tracker.ceph.com/issues/73490
Original tracker: https://tracker.ceph.com/issues/73018
Backport of #65525
Original PR comment:
From the comment at the beginning of the file
the format for snapshot+obj to obj
should be
SNA_%lld_%llx_.%lx rather than SNA_%lld_%llx.%lx in parse_m
the check for sscanf return value is also incorrect,
it returns the number of input items successfully matched and assigned.
before fix,
we always get shard 255(NO_SHARD)
snap_mapper _parse_m mapping pool 4 snap b shard 255 4:0063648e:::1000000026b.00000000:b
but for erase pool object, it will have shard
snap_mapper _parse_m mapping pool 4 snap b shard 0 4:0063648e:::1000000026b.00000000:b
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