Skip to content

cephfs: allow FS rename only if refuse_client_session is set#54306

Closed
rishabh-d-dave wants to merge 4 commits intoceph:mainfrom
rishabh-d-dave:fs-rename-refuse-clients
Closed

cephfs: allow FS rename only if refuse_client_session is set#54306
rishabh-d-dave wants to merge 4 commits intoceph:mainfrom
rishabh-d-dave:fs-rename-refuse-clients

Conversation

@rishabh-d-dave
Copy link
Contributor

@rishabh-d-dave rishabh-d-dave commented Nov 2, 2023

This PR depends on PR #53899. It also includes commits from that PR so that it's easy to rebase this PR when that PR merges.

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

Signed-off-by: Rishabh Dave <ridave@redhat.com>
"""
rename volume (orch MDS service, file system, pools)
"""
errno, errmsg = _perform_checks_before_renaming_vol(mgr, volname)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a need for this check here since the check (involving CEPH_MDSMAP_REFUSE_CLIENT_SESSION) is done in the monitor?

@rishabh-d-dave rishabh-d-dave force-pushed the fs-rename-refuse-clients branch 2 times, most recently from b762a3e to ad6eb39 Compare November 2, 2023 13:15
Reject the attempt to rename the CephFS is the CephFS is not offline.
Add new tests for this and update current tests accordingly.

Fixes: https://tracker.ceph.com/issues/63154
Signed-off-by: Rishabh Dave <ridave@redhat.com>
Move tests for "ceph fs volume rename" command to a new class. This
makes it possible to run this group of tests in a single command.

This provides a convenient way to execute these tests which is necessary
after the changes has been made to the code for the "ceph fs volume
rename" command.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
client_refuse_session must be set for a CephFS before an attempt to
rename a CephFS can be made. Add a new test for this, and update current
tests (test_admin.py and test_volumes.py) accordingly.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
@rishabh-d-dave rishabh-d-dave force-pushed the fs-rename-refuse-clients branch from ad6eb39 to fab5dbe Compare November 2, 2023 13:30
@rishabh-d-dave
Copy link
Contributor Author

Since a patch for mgr/vol has been deleted this PR, I am moving the commit of this PR (the final commit on the PR branch) to PR #53899 and closing this PR.

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.

2 participants