Skip to content

mon: block osd pool mksnap for fs pools#51275

Merged
yuriw merged 2 commits intoceph:mainfrom
mchangir:mon-block-osd-pool-mksnap-for-fs-pools
Jul 7, 2023
Merged

mon: block osd pool mksnap for fs pools#51275
yuriw merged 2 commits intoceph:mainfrom
mchangir:mon-block-osd-pool-mksnap-for-fs-pools

Conversation

@mchangir
Copy link
Contributor

@mchangir mchangir commented Apr 28, 2023

Fixes: https://tracker.ceph.com/issues/59552
Signed-off-by: Milind Changire mchangir@redhat.com

Contribution Guidelines

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

@mchangir mchangir requested a review from a team as a code owner April 28, 2023 04:57
@mchangir
Copy link
Contributor Author

mchangir commented May 2, 2023

jenkins test make check

1 similar comment
@mchangir
Copy link
Contributor Author

mchangir commented May 2, 2023

jenkins test make check

@vshankar vshankar requested a review from rzarzynski May 2, 2023 12:56
@vshankar
Copy link
Contributor

vshankar commented May 2, 2023

@mchangir Needs a bit more explanation in the commit message.

@mchangir mchangir force-pushed the mon-block-osd-pool-mksnap-for-fs-pools branch from 0f6fd5f to 109f9c9 Compare May 3, 2023 04:00
@mchangir
Copy link
Contributor Author

mchangir commented May 3, 2023

@mchangir Needs a bit more explanation in the commit message.

ack; added a detailed note in the commit message

@vshankar
Copy link
Contributor

vshankar commented May 3, 2023

LGTM. Need @rzarzynski review though.

@rzarzynski
Copy link
Contributor

This PR is basically a follow-up to #47753. Linking for the sake of clarity.

if (pp->snap_exists(snapname.c_str())) {
ss << "pool " << poolstr << " snap " << snapname << " already exists";
} else {
if (const auto& fsmap = mon.mdsmon()->get_fsmap(); fsmap.pool_in_use(pool)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

From the commit description:

Pool level snaps and mon managed snaps can't co-exist (...)

Isn't this a thinko? Per #47753 (comment) I started thinking it's about Pool level snaps and FS level snaps.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes; this is about FS level snaps and Pool level snaps
its just the nomenclature that @gregsfortytwo has used to refer to it (AFAIUI)

but looks like the phrasing should be changed to FS level snaps and Pool level snaps can't coexist

Copy link
Contributor Author

Choose a reason for hiding this comment

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

phrasing changed to "Pool-level and fs-level snapshots ..."

base_cmd = f'osd pool mksnap {test_pool_name} snap3'
self.run_cluster_cmd(base_cmd)

with self.assertRaises(CommandFailedError):
Copy link
Contributor

Choose a reason for hiding this comment

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

ACK.

mchangir added 2 commits May 8, 2023 13:22
Commit 23db15d disabled pool snaps for the rados mksnap path. But
ceph osd pool mksnap was an alternate way that pool snaps could be
created.
This commit disables pool snaps via this alternate path as well.

NOTE:
Pool-level snaps and fs-level snaps can't co-exist since snap IDs are
likely to clash between the two different mechanisms and can result in
unintentional data loss when either of the snaps are deleted.

Fixes: https://tracker.ceph.com/issues/59552
Signed-off-by: Milind Changire <mchangir@redhat.com>
Signed-off-by: Milind Changire <mchangir@redhat.com>
@mchangir mchangir force-pushed the mon-block-osd-pool-mksnap-for-fs-pools branch from 109f9c9 to ab64bfa Compare May 8, 2023 07:54
@mchangir
Copy link
Contributor Author

mchangir commented May 8, 2023

rebased as well ...

@vshankar
Copy link
Contributor

jenkins retest this please

@vshankar
Copy link
Contributor

jenkins test windows

@vshankar
Copy link
Contributor

@yuriw please pick this up for main branch test runs.

@rzarzynski
Copy link
Contributor

@yuriw: it's ready for testing.

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.

5 participants