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
osd/SnapMapper: fix legacy key conversion in snapmapper class #46908
Conversation
|
Introduced here: 94ebe0e |
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.
Please edit the commit and PR title. https://github.com/ceph/ceph/blob/main/SubmittingPatches.rst#commit-title
|
Hi @Matan-B The commit / PR title should be prefixed with osd: ... , or do I miss something else? Do you think there could old structures remaining after successful conversion? As far as I see, after successful conversion the superblock will be updated. |
Yes, osd/SnapMapper:
I'm afraid that clone objects created before upgrading may not be deleted correctly, as the tracker implies.
I'm looking into this and I'm available for any question! 👍 |
1c88cad
to
e45f478
Compare
Ah yes, I see your point. Unfortunately the faulty conversion deleted the old MAP_ entries. So I'm not quite sure how to recover this. |
|
jenkins test make check |
|
Upgrade suite Teuthology runs: |
|
@athanatos: do the updated commits addresses the worry for having the fix in octopus? |
|
Squash all three commits to a single commit. In general (and particularly since we need to backport this) the commit message needs to do a good job of explaining what the commit does. Since it's a backport it also must include the Fixes line in the commit message itself. How about: edit: had the version wrong |
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.
Pretty close, I suggested an explanatory comment, a name change, and the commit message needs to be fixed.
|
@neha-ojha Given that we'll want to backport this relatively quickly, can you look over it as well? |
Octopus modified the SnapMapper key format from <LEGACY_MAPPING_PREFIX><snapid>_<shardid>_<hobject_t::to_str()> to <MAPPING_PREFIX><pool>_<snapid>_<shardid>_<hobject_t::to_str()> When this change was introduced, 94ebe0e also introduced a conversion with a crucial bug which essentially destroyed legacy keys by mapping them to <MAPPING_PREFIX><poolid>_<snapid>_ without the object-unique suffix. This commit fixes this conversion going forward, but a fix for existing clusters still needs to be developed. Fixes: https://tracker.ceph.com/issues/56147 Signed-off-by: Manuel Lausch <manuel.lausch@1und1.de> Signed-off-by: Matan Breizman <mbreizma@redhat.com>
c4c9be4
to
66bea86
Compare
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.
LGTM, I will run it through testing and we'll include the octopus backport of this patch in the final octopus point release, if testing goes fine.
@Matan-B Please raise a separate PR for the teuthology test you added to catch this bug |
|
jenkins test windows |
|
https://pulpito.ceph.com/?branch=snapshot_key_conversion Unrelated Failures: Details: |
Octopus modified the SnapMapper key format from
<LEGACY_MAPPING_PREFIX><snapid>_<shardid>_<hobject_t::to_str()>to
<MAPPING_PREFIX><pool>_<snapid>_<shardid>_<hobject_t::to_str()>When this change was introduced, 94ebe0e also introduced a conversion
with a crucial bug which essentially destroyed legacy keys by mapping them
to
<MAPPING_PREFIX><poolid>_<snapid>_without the object-unique suffix. This commit fixes this conversion going
forward, but a fix for existing clusters still needs to be developed.
Unit test result:
Fixes: https://tracker.ceph.com/issues/56147
Signed-off-by: Manuel Lausch manuel.lausch@1und1.de
Signed-off-by: Matan Breizman mbreizma@redhat.com