Skip to content

osd, test: drop the pre-octopus keys conversion of SnapMapper#60855

Closed
rzarzynski wants to merge 1 commit intoceph:mainfrom
rzarzynski:wip-osd-drop-snapmapper-legacy
Closed

osd, test: drop the pre-octopus keys conversion of SnapMapper#60855
rzarzynski wants to merge 1 commit intoceph:mainfrom
rzarzynski:wip-osd-drop-snapmapper-legacy

Conversation

@rzarzynski
Copy link
Contributor

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 x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

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
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows
  • jenkins test rook e2e

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
Copy link
Contributor

@Matan-B Matan-B left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense.

Copy link
Contributor

@Matan-B Matan-B Jan 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

+ "_" + object_suffix;
}

int SnapMapper::convert_legacy(
Copy link
Contributor

@Matan-B Matan-B Nov 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should have an offline tool (an extension to COT?) to rebuilt the SnapMapper database (as a follow-up).

Copy link
Contributor

@Matan-B Matan-B Jan 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow-up tracker: https://tracker.ceph.com/issues/69565
Should we paste it near the abort as a comment?

Copy link
Contributor

@Matan-B Matan-B left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_";
Copy link
Contributor

@Matan-B Matan-B Jan 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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();
Copy link
Contributor

@Matan-B Matan-B Jan 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow-up tracker: https://tracker.ceph.com/issues/69565
Should we paste it near the abort as a comment?

@rzarzynski
Copy link
Contributor Author

Do we want to leave that as a comment or in a dedicated doc note?

I think that a comment might be easier-to-find than a doc.

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.

Follow-up seems preferable to not block squeezing the old get_omap_iterator() out. Yet, I'm looking into adding the feature to COT.

@rzarzynski
Copy link
Contributor Author

jenkins test make check

@NitzanMordhai
Copy link
Contributor

NitzanMordhai commented Feb 26, 2025

@NitzanMordhai
Copy link
Contributor

jenkins test make check arm64

@yuriw
Copy link
Contributor

yuriw commented Feb 26, 2025

@rzarzynski pls merge when all checks passed
ref: https://tracker.ceph.com/issues/70009

@github-actions
Copy link

github-actions bot commented Apr 3, 2025

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@rzarzynski
Copy link
Contributor Author

Merged altogether with #60890.

@rzarzynski rzarzynski closed this Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants