cephfs,mon: fs rename must require FS to be offline and refuse_client_session to be set#53899
Conversation
45b19a9 to
dc494c1
Compare
|
@rishabh-d-dave ping back when ready for another round of review. |
|
why not enable fs rename code to do it on its own? i.e. fail fs before renaming and then post rename set joinable to true? this can save operator's time and reduce complexity for a naive user i guess |
Because its destructive and doing it by default is not a good idea.
Its the naive users we need to give extra care at times :) |
Signed-off-by: Rishabh Dave <ridave@redhat.com>
dc494c1 to
117b0a6
Compare
c5e9d0f to
aa3232f
Compare
7f51106 to
5d5419a
Compare
|
jenkins test make check |
|
jenkins test api |
eac7a7b to
2e63452
Compare
|
test_volumes: https://pulpito.ceph.com/rishabh-2023-11-01_05:37:22-fs:volumes-rishabh-fs-rename-testing-2-testing-default-smithi EDIT - |
c3119b9 to
78d9e6d
Compare
Could you describe the failure and the commit diff that subsequently fixed it? |
78d9e6d to
ed9cb3a
Compare
|
@rishabh-d-dave As discussed in slack, it would suffice with the existing checks in the monitor to disallow rename if the file system is still online. EDIT: s/IRC/slack |
cfe0fc7 to
ca0633b
Compare
Reject the attempt to rename the CephFS is the CephFS is not offline. Add new tests for this and update current tests (test_admin.py and test_volumes.py) 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. Fixes: https://tracker.ceph.com/issues/63154 Signed-off-by: Rishabh Dave <ridave@redhat.com>
ca0633b to
3f93d74
Compare
|
@rishabh-d-dave also requires a note in PendingReleaseNotes. |
| # data pool names unchanged | ||
| self.assertCountEqual(orig_data_pool_names, list(self.fs.data_pools.values())) | ||
|
|
||
| def test_rename_when_fs_is_online(self): |
There was a problem hiding this comment.
Is this test really required since test_admin.test_rename_when_fs_is_online exists?
There was a problem hiding this comment.
In mgr/volumes, the code for renaming volumes is more than 100 LoC. IMHO, it is a nice idea to keep this test here so that we catch issues sooner.
There was a problem hiding this comment.
We discussed yesterday that the nature of this test isn't clear since we already have the corresponding test in test_admin. What specific 100 LoC is this test validating? Sorry, but this isn't an excuse to writing duplicate tests.
There was a problem hiding this comment.
Hi @vshankar. This was a mistake. I was supposed to merge "fs swap" PR and leave this one unmerged but I made a mistake while merging the batch of PRs and ended up with the reverse. You may check the fs swap PR, it's still unmerged - #50212. I'll open a PR to delete the test.
Sorry to get you angry. :)
There was a problem hiding this comment.
Hi @vshankar. This was a mistake. I was supposed to merge "fs swap" PR and leave this one unmerged but I made a mistake while merging the batch of PRs and ended up with the reverse. You may check the fs swap PR, it's still unmerged - #50212. I'll open a PR to delete the test.
Sorry to get you angry. :)
I was not angry - just that I didn't find an explanation regarding the pending comments :)
rishabh-d-dave
left a comment
There was a problem hiding this comment.
CephFS integration tests were successful - https://tracker.ceph.com/projects/cephfs/wiki/Main#7-Nov-2023
|
@rishabh-d-dave What about this comment - #53899 (comment) ? |
With merging of PR ceph#53899 it is mandatory now for CephFS to be offline and refuse_client_session to be set before an attempt to rename the CephFS is made. Fixes: ceph#53899 Fixes: https://tracker.ceph.com/issues/63154 Signed-off-by: Rishabh Dave <ridave@redhat.com>
With merging of PR ceph#53899 it is mandatory now for CephFS to be offline and refuse_client_session to be set before an attempt to rename the CephFS is made. Add a release note for this. Fixes: ceph#53899 Fixes: https://tracker.ceph.com/issues/63154 Signed-off-by: Rishabh Dave <ridave@redhat.com>
Before renaming a CephFS, make sure that the CephFS is offline and refuse_client_session is set for it.
Fixes: https://tracker.ceph.com/issues/63154
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. "pacific"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
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 windows