osd, test: drop the pre-octopus keys conversion of SnapMapper#60855
osd, test: drop the pre-octopus keys conversion of SnapMapper#60855rzarzynski wants to merge 1 commit intoceph:mainfrom
Conversation
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
Matan-B
left a comment
There was a problem hiding this comment.
We can also cleanup removed_snap_ and removed_epoch_ which were replaced by purged_snap_ and purged_snap_ after octopus.
if (osdmap.require_osd_release < ceph_release_t::octopus &&
tmp.require_osd_release >= ceph_release_t::octopus) {
dout(10) << __func__ << " first octopus+ epoch" << dendl;
...
// clean out the old removed_snap_ and removed_epoch keys
// ('`' is ASCII '_' + 1)
t->erase_range(OSD_SNAP_PREFIX, "removed_snap_", "removed_snap`");
t->erase_range(OSD_SNAP_PREFIX, "removed_epoch_", "removed_epoch`");
| using code_t = Scrub::SnapMapReaderI::result_t::code_t; | ||
|
|
||
|
|
||
| const string SnapMapper::LEGACY_MAPPING_PREFIX = "MAP_"; |
There was a problem hiding this comment.
Before removing MAP_, removed_snap_,removed_epoch_ I think that we should note somewhere that these keys were used before octopus in case someone tries to understand where they came from.
There was a problem hiding this comment.
Makes sense.
Do we want to leave that as a comment or in a dedicated doc note?
| goto out; | ||
| derr << __func__ << " snap_mapper upgrade from pre-octopus" | ||
| << " is no longer supported" << dendl; | ||
| ceph_abort(); |
| + "_" + object_suffix; | ||
| } | ||
|
|
||
| int SnapMapper::convert_legacy( |
There was a problem hiding this comment.
What do you think about leaving these helpers as legacy to be used as a tool when clusters, for some reason, still have the old legacy keys stored? (e.g failure in conversion)
There was a problem hiding this comment.
Removal of the legacy is caused by its dependency on the ObjectStore::get_omap_iterator() which is getting dropped. Switching to omap_iterate() is problematic due to lack of viable testing – the code should be already dead.
I think it's better to explicitly lack the code than provide barely tested new variant.
| goto out; | ||
| derr << __func__ << " snap_mapper upgrade from pre-octopus" | ||
| << " is no longer supported" << dendl; | ||
| ceph_abort(); |
There was a problem hiding this comment.
We should have an offline tool (an extension to COT?) to rebuilt the SnapMapper database (as a follow-up).
There was a problem hiding this comment.
Follow-up tracker: https://tracker.ceph.com/issues/69565
Should we paste it near the abort as a comment?
Matan-B
left a comment
There was a problem hiding this comment.
lgtm, left two comments.
One question would be, whether we want to block this until the COT extension is there or do we consider this as a follow-up.
IMO, given that this PR is a possible dependency for #60890 I'm ok with a future follow up.
| using code_t = Scrub::SnapMapReaderI::result_t::code_t; | ||
|
|
||
|
|
||
| const string SnapMapper::LEGACY_MAPPING_PREFIX = "MAP_"; |
There was a problem hiding this comment.
Makes sense.
Do we want to leave that as a comment or in a dedicated doc note?
| goto out; | ||
| derr << __func__ << " snap_mapper upgrade from pre-octopus" | ||
| << " is no longer supported" << dendl; | ||
| ceph_abort(); |
There was a problem hiding this comment.
Follow-up tracker: https://tracker.ceph.com/issues/69565
Should we paste it near the abort as a comment?
I think that a comment might be easier-to-find than a doc.
Follow-up seems preferable to not block squeezing the old |
|
jenkins test make check |
|
jenkins test make check arm64 |
|
@rzarzynski pls merge when all checks passed |
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
|
Merged altogether with #60890. |
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. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.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 windowsjenkins test rook e2e