Skip to content

cephfs: add command "ceph fs swap" - #50212

Merged
rishabh-d-dave merged 9 commits into
ceph:mainfrom
rishabh-d-dave:fs-swap-subcmd
Nov 8, 2023
Merged

rishabh-d-dave merged 9 commits into
ceph:mainfrom
rishabh-d-dave:fs-swap-subcmd

Conversation

@rishabh-d-dave

@rishabh-d-dave rishabh-d-dave commented Feb 22, 2023 •

Copy link
Copy Markdown
Contributor

Add a FS command that enables users to swap names of two file systems in
a single PAXOS transaction.

Fixes: https://tracker.ceph.com/issues/58129

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

@rishabh-d-dave
rishabh-d-dave requested a review from a team as a code owner February 22, 2023 13:55
@rishabh-d-dave rishabh-d-dave added cephfs Ceph File System tests labels Feb 22, 2023
@rishabh-d-dave
rishabh-d-dave marked this pull request as draft February 22, 2023 13:56
Comment thread src/mon/FSCommands.cc Resolved
Comment thread src/mon/FSCommands.cc Resolved
@rishabh-d-dave
rishabh-d-dave marked this pull request as ready for review March 13, 2023 13:18
@rishabh-d-dave
rishabh-d-dave requested a review from a team March 13, 2023 13:18
@rishabh-d-dave
rishabh-d-dave force-pushed the fs-swap-subcmd branch 4 times, most recently from fab9697 to 2c56e70 Compare March 20, 2023 19:34
@rishabh-d-dave
rishabh-d-dave requested a review from batrick March 21, 2023 19:54
@rishabh-d-dave

Copy link
Copy Markdown
Contributor Author

@batrick

test_fs_swap is passing locally every time but with teuthology fails every time at this line - https://github.com/ceph/ceph/pull/50212/files#diff-534e44897921b6dcac93d2c7bb1cf04a3727bf1f025c579f83d898e2c2257400R836.

From output of fs dump it looks like the fs swap command had no effect, FS names are unswapped. I added a sleep (of 5 minutes) to test code after fs swap command gets executed thinking maybe it needs a little time to upgrade map but that didn't help.

Can you please take a quick look and let me know if current changes look okay?

Following is the link to latest run, in case you want to take a look - http://pulpito.front.sepia.ceph.com/rishabh-2023-03-21_17:30:06-fs:functional-wip-rishabh-fs-swap-subcmd-distro-default-smithi/

And here's the branch that I passed to --suite-branch option - https://github.com/rishabh-d-dave/ceph/tree/fs-swap-subcmd-temp

@rishabh-d-dave
rishabh-d-dave force-pushed the fs-swap-subcmd branch 2 times, most recently from 7fa7cae to 13781c5 Compare March 23, 2023 13:13
Comment thread src/mds/FSMap.h Resolved
@github-actions

Copy link
Copy Markdown

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

When assert fails for equality of two variables and when both the
variables are printed in error message, print each variable on a new
line.

Signed-off-by: Rishabh Dave <[email protected]>
Comment thread PendingReleaseNotes Resolved
Comment thread src/mon/FSCommands.cc Resolved
When two values (say x and y) are being printed because assert for
equality of both failed (assert x == y), print both the values on a new
line.

Signed-off-by: Rishabh Dave <[email protected]>
Commands issued by negtest_ceph_cmd() aren't printed because log level
(due to code for teuthology) changes from DEBUG to INFO in case of some
files.

This patch ensures that users can see commands being executed regardless
of whether log level is changed or not.

Signed-off-by: Rishabh Dave <[email protected]>

@batrick batrick left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for writing tests cases for all the edge cases!

Comment thread PendingReleaseNotes Resolved
Comment thread doc/cephfs/administration.rst Resolved
Comment thread doc/cephfs/administration.rst Resolved
Comment thread doc/man/8/ceph.rst Resolved
Comment thread src/mds/FSMap.cc Resolved
Comment thread src/mds/FSMap.cc Resolved
Comment thread src/mon/FSCommands.cc Resolved
Comment thread src/mon/FSCommands.cc Resolved
Comment thread src/mon/FSCommands.cc Resolved
Comment thread src/mon/FSCommands.cc Resolved
Comment thread PendingReleaseNotes Resolved
Comment thread doc/cephfs/administration.rst Resolved
Comment thread doc/cephfs/administration.rst Resolved

@batrick batrick left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good work!

@rishabh-d-dave

Copy link
Copy Markdown
Contributor Author

Last push was about bits of minor fixes and improvements I made while running tests locally.

@vshankar vshankar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. @rishabh-d-dave please proceed to integration runs.

@rishabh-d-dave

Copy link
Copy Markdown
Contributor Author

Tests needs some minor debugging and fixing.

Add a FS command that enables users to swap names of two file systems in
a single PAXOS transaction. Add an option to this command that swaps
FSCIDS along with FS names. This commands also updates the application
pool tags and fails when mirroring is enabled on either or both FSs.

Fixes: https://tracker.ceph.com/issues/58129
Signed-off-by: Rishabh Dave <[email protected]>
Create an alias so "APP_NAME_CEPHFS" can be written instead of
"pg_pool_t::APPLICATION_NAME_CEPHFS".

Signed-off-by: Rishabh Dave <[email protected]>
When working with large group tests (18 in this case), it gets very
tedious to debug and fix tests when all 18 have to be run again for
every mistake. Cheap fix for this to split these 18 tests into several
classes.

But when modification are made to the feature, all these 18 tests needs
to exercised and previous solution forces developer to intitiate all
these test classes to run one by one.

Best of both worlds can be achieved if we split tests into group but
move all these related group to a new file.

Signed-off-by: Rishabh Dave <[email protected]>
@rishabh-d-dave

Copy link
Copy Markdown
Contributor Author

Ran tests a bunch of times locally, tests are working fine now.

@rishabh-d-dave rishabh-d-dave left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@rishabh-d-dave

Copy link
Copy Markdown
Contributor Author

jenkins test make check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants