Skip to content

tentacle: osd/SnapMapper: fix SnapMapper::Scrubber shard parsing - #73806

Merged
batrick merged 2 commits into
ceph:tentaclefrom
ronen-fr:wip-rf-65525-tentacle
Nov 27, 2026
Merged

batrick merged 2 commits into
ceph:tentaclefrom
ronen-fr:wip-rf-65525-tentacle

Conversation

@ronen-fr

@ronen-fr ronen-fr commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

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

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

ethanwu-syno and others added 2 commits November 12, 2026 09:23
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)
@ronen-fr
ronen-fr requested a review from a team as a code owner November 12, 2026 09:28
@github-actions github-actions Bot added the core label Nov 12, 2026
@github-actions github-actions Bot added this to the tentacle milestone Nov 12, 2026
@ronen-fr
ronen-fr requested review from Matan-B and ljflores November 12, 2026 09:28
github-actions[bot]

This comment was marked as outdated.

@github-actions github-actions Bot added the releng-audit-fail Release engineering: failed backport verification audit. label Nov 12, 2026
@ronen-fr

Copy link
Copy Markdown
Contributor Author

/audit retest

@github-actions

Copy link
Copy Markdown

🔄 Audit Retest Triggered by @ronen-fr.

View workflow run

@github-actions github-actions Bot added releng-audit-pass Release engineering: passed backport verification audit. and removed releng-audit-fail Release engineering: failed backport verification audit. labels Nov 12, 2026
@SrinivasaBharath

Copy link
Copy Markdown
Contributor

This PR has been added to wip-bharath31-testing-20261114.234838-tentacle.

@ronen-fr

Copy link
Copy Markdown
Contributor Author

@batrick batrick modified the milestones: tentacle, v20.2.6 Nov 27, 2026
@batrick
batrick merged commit 34b5c66 into ceph:tentacle Nov 27, 2026
19 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core needs-qa releng-audit-pass Release engineering: passed backport verification audit. wip-bharath31-testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants