New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tools/cephfs_mirror: enable multiple peers #52456
base: main
Are you sure you want to change the base?
Conversation
37ff527
to
8b44f47
Compare
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
2ed4b18
to
f68827a
Compare
f68827a
to
d1b2c1b
Compare
Fixes: https://tracker.ceph.com/issues/61978 Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
d1b2c1b
to
fb33952
Compare
@vshankar There's just one test case added currently and I'm sure more needs to be added; can you help identify what all should I test, some test cases that I identified based on existing tests could be:
Do let me know if the above list needs any addition/removal |
qa/tasks/cephfs/test_mirroring.py
Outdated
@@ -1305,3 +1319,23 @@ def test_local_and_remote_dir_root_mode(self): | |||
self.disable_mirroring(self.primary_fs_name, self.primary_fs_id) | |||
self.mount_a.run_shell(["rmdir", "l1/.snap/snap0"]) | |||
self.mount_a.run_shell(["rmdir", "l1"]) | |||
|
|||
def test_mirror_multiple_peers(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should also check if the snapshots have been synchronized to all the peers.
I suggest, creating a separate class for
- fan-out peer setup (site-a->site-b, site-a->site-c, site-a->site-d)
- cascaded setup (site-a->site-b->site-c->site-d)
Mostly, you'd need to verify if the snapshots get synchronized to all peers - this would involve checks via peer status
command.
@vshankar local test case failure(unable to run admin-daemon cmd) https://termbin.com/9j8zf |
other admin-daemon cmds not working https://termbin.com/wuz5 I know these cmds are incomplete and ought to fail but it should've not said this right, should've threw some suggestions(yesterday worked fine) |
9c61fc0
to
2e0d510
Compare
@dparmar18 In my list. On it soon. |
@vshankar ah i was talking about this one #52524. This PR is still wip |
Ah ok. Best is to tag me on the PR mentioning that it's ready for review. |
a493198
to
8587d46
Compare
@vshankar the test_mirroring.py needs further more changes to accommodate the cascaded setup, it includes touching class |
Touching which test cases? The one's in TestMirroring that exists now? You can add the fan-out/cascaded tests in a separate class, since the only test that would make sense there is to validate that the snapshots synchronize to all the peers. |
i have added a new class for helpers(because the classes i wrote had to use helpers present in TestMirroring); TestMirroring and other two classes(that i added for testing fan out and cascaded setup) now use those helpers. These helpers have some values hardcoded like |
Fixes: https://tracker.ceph.com/issues/61978 Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
c32dc5e
to
eab5762
Compare
test classes are ready but you mentioned on IRC last week that we need more YAMLs for these classes to only run a subset of tests? Should I put them in |
Yeh - |
3b2e417
to
e1f6ec6
Compare
Fixes: https://tracker.ceph.com/issues/61978 Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
Fixes: https://tracker.ceph.com/issues/61978 Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
e1f6ec6
to
5d589d6
Compare
@vshankar there are a lot of changes made to the existing code (and there are some more plans in future to the qa code), if you need help, we can go through the changes together. Do let me know |
|
||
class MirroringHelpers(CephFSTestCase): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is an helper class, I believe this need not be subclassed from CephFSTestCase
, yes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it'a a bit complicated, the actual plan is, YES make this helper class an actual helper class but it requires a lot of changes that are unrelated to this PR(making changes to all other test cases). It's a bit hard to explain you in comment, if possible do let know if/when you can join for a call or maybe discuss this post standup tomorrow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry but hard to explain why this needs to be subclassed from CephFSTestCase
? Could you explain a bit and I'll try my best to understand.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that it's not just me who is required to review PRs - so taking time to explain here is going to benefit everyone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the thing is that the change to enable multiple peers required me to create a helper class since the existing helpers in the class TestMirroring
has hard coded values that only applies to single peer but just adding those helpers into a class and use it into test classes directly is not enough because the helpers that are used in the existing class TestMirroring
(that are also used in the classes I wrote) now need modifications. This forced me to make changes in this PR that are not related (to the tracker). So in order to make minimal unrelated changes, some helpers still depends on the CephFSTestCase
, thus you see it being inherited.
I'm planning to make it a proper helper class but I'm not sure which way to go with; either I can make the changes here in this PR altogether or in a new PR. I'm open to suggestions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the thing is that the change to enable multiple peers required me to create a helper class since the existing helpers in the class
TestMirroring
has hard coded values that only applies to single peer but just adding those helpers into a class and use it into test classes directly is not enough because the helpers that are used in the existing classTestMirroring
(that are also used in the classes I wrote) now need modifications. This forced me to make changes in this PR that are not related (to the tracker). So in order to make minimal unrelated changes, some helpers still depends on theCephFSTestCase
, thus you see it being inherited.I'm planning to make it a proper helper class but I'm not sure which way to go with; either I can make the changes here in this PR altogether or in a new PR. I'm open to suggestions.
IMO having is as a separate (standalone) helper would be the better. I understand that its more work that's the current implementation, but it way better in maintenance in the longer run.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so you want me to do it in this PR itself right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
@@ -242,6 +258,24 @@ def get_mirror_daemon_status(self): | |||
log.debug(f'status: {status}') | |||
return status | |||
|
|||
|
|||
class TestMirroring(MirroringHelpers): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And, then this can be subclassed from MirroringHelpers
and CephFSTestCase
.
jenkins test make check |
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
This pull request has been automatically closed because there has been no activity for 90 days. Please feel free to reopen this pull request (or open a new one) if the proposed change is still appropriate. Thank you for your contribution! |
As discussed, @dparmar18 will revisit this once other higher priority items are taken care. |
Fixes: https://tracker.ceph.com/issues/61978
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 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