Skip to content

qa/cephfs: add helper methods in CephFSTestCase#50569

Merged
rishabh-d-dave merged 9 commits intoceph:mainfrom
rishabh-d-dave:CephManager-in-CephFSTestCase
Jul 13, 2023
Merged

qa/cephfs: add helper methods in CephFSTestCase#50569
rishabh-d-dave merged 9 commits intoceph:mainfrom
rishabh-d-dave:CephManager-in-CephFSTestCase

Conversation

@rishabh-d-dave
Copy link
Contributor

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 March 17, 2023 06:54
@github-actions github-actions bot added the nfs label Mar 17, 2023
@rishabh-d-dave rishabh-d-dave force-pushed the CephManager-in-CephFSTestCase branch 2 times, most recently from 93cbae1 to 8e1000f Compare March 17, 2023 16:53
@rishabh-d-dave rishabh-d-dave force-pushed the CephManager-in-CephFSTestCase branch from 8e1000f to c7dd3b5 Compare March 23, 2023 08:46
@rishabh-d-dave
Copy link
Contributor Author

Improved commit message for commit 6a1283c and also rebased the PR branch.

@rishabh-d-dave rishabh-d-dave force-pushed the CephManager-in-CephFSTestCase branch 4 times, most recently from 3f65179 to df93492 Compare March 28, 2023 08:32
@rishabh-d-dave rishabh-d-dave force-pushed the CephManager-in-CephFSTestCase branch from df93492 to 27e9df1 Compare March 29, 2023 12:41
@vshankar
Copy link
Contributor

@rishabh-d-dave Wound't it make sense to have a singleton MonManger object in CephFSTestCase and everything else using this singleton object rather than instantiating all over the place?

@rishabh-d-dave
Copy link
Contributor Author

@rishabh-d-dave Wound't it make sense to have a singleton MonManger object in CephFSTestCase and everything else using this singleton object rather than instantiating all over the place?

That will certainly reduce total number of CephManage instances and save some space. I'll make this change as per our discussion we hade verbally.

@vshankar
Copy link
Contributor

@rishabh-d-dave Wound't it make sense to have a singleton MonManger object in CephFSTestCase and everything else using this singleton object rather than instantiating all over the place?

That will certainly reduce total number of CephManage instances and save some space. I'll make this change as per our discussion we hade verbally.

@rishabh-d-dave You did reach out to me on IRC saying that this effort is probably not worth doing. Is that still true?

@rishabh-d-dave
Copy link
Contributor Author

@vshankar

@rishabh-d-dave Wound't it make sense to have a singleton MonManger object in CephFSTestCase and everything else using this singleton object rather than instantiating all over the place?

That will certainly reduce total number of CephManage instances and save some space. I'll make this change as per our discussion we hade verbally.

@rishabh-d-dave You did reach out to me on IRC saying that this effort is probably not worth doing. Is that still true?

Yes, I think so now too. A singleton design pattern for class CephManager will save a very tiny amount of space in memory which doesn't matter. We should proceed to test this PR without it.

@rishabh-d-dave
Copy link
Contributor Author

jenkins test api

@vshankar vshankar requested a review from a team April 18, 2023 09:19
@vshankar
Copy link
Contributor

@vshankar

@rishabh-d-dave Wound't it make sense to have a singleton MonManger object in CephFSTestCase and everything else using this singleton object rather than instantiating all over the place?

That will certainly reduce total number of CephManage instances and save some space. I'll make this change as per our discussion we hade verbally.

@rishabh-d-dave You did reach out to me on IRC saying that this effort is probably not worth doing. Is that still true?

Yes, I think so now too. A singleton design pattern for class CephManager will save a very tiny amount of space in memory which doesn't matter. We should proceed to test this PR without it.

The intent was not about saving memory - the singleton design avoids cluttering various classes and structures with redundant class objects.

Anyway, I won't come in between much on this.

@github-actions
Copy link

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

@rishabh-d-dave rishabh-d-dave force-pushed the CephManager-in-CephFSTestCase branch from 27e9df1 to 161a1c3 Compare April 27, 2023 12:05
@vshankar
Copy link
Contributor

OK -- @rishabh-d-dave mentioned that the way forward isn't clear. What I meant was although singleton would be have been better, I'm fine with not implementing that for now.

@rishabh-d-dave Please do the needful to get this merged.

@rishabh-d-dave rishabh-d-dave force-pushed the CephManager-in-CephFSTestCase branch 2 times, most recently from 3160145 to dd3fcfc Compare April 30, 2023 10:53
Add run_ceph_cmd(), get_ceph_cmd_stdout() and get_ceph_cmd_result() to
class Filesystem so that running Ceph command is easier. This affects
not only methods inside class Filesystem but also methods elsewhere that
uses instance of class Filesystem to run Ceph commands.

Instead of "self.fs.mon_manager.raw_cluster_cmd()" writing
"self.fs.run_ceph_cmd()" will suffice.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
In filesystem.py and wherever instance of class Filesystem are used, use
run_ceph_cmd() instead of get_ceph_cluster_stdout() when output of Ceph
command is not required.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
@rishabh-d-dave rishabh-d-dave force-pushed the CephManager-in-CephFSTestCase branch from 26ee97c to 0a781ef Compare June 28, 2023 12:08
@rishabh-d-dave
Copy link
Contributor Author

jenkins test make check

@rishabh-d-dave
Copy link
Contributor Author

jenkins test api

1 similar comment
@rishabh-d-dave
Copy link
Contributor Author

jenkins test api

@rishabh-d-dave
Copy link
Contributor Author

jenkins test make check

@rishabh-d-dave
Copy link
Contributor Author

Failure looks unrelated - https://jenkins.ceph.com/job/ceph-pull-requests/117973/

@rishabh-d-dave
Copy link
Contributor Author

@rishabh-d-dave
Copy link
Contributor Author

jenkins test api

@rishabh-d-dave
Copy link
Contributor Author

Although API tests failed, the failue neither looks to be related to this PR now is it same as before - https://jenkins.ceph.com/job/ceph-api/58053/.

@rishabh-d-dave
Copy link
Contributor Author

jenkins test api

@dparmar18
Copy link
Contributor

dparmar18 commented Jul 11, 2023

Although API tests failed, the failue neither looks to be related to this PR now is it same as before - https://jenkins.ceph.com/job/ceph-api/58053/.

api tests are failing due to this https://tracker.ceph.com/issues/61907

EDIT: Yup, I can see the warnings in the cluster log from the above the api tests link https://jenkins.ceph.com/job/ceph-api/58053/artifact/build/out/cluster.mon.a.log

@rishabh-d-dave
Copy link
Contributor Author

Although API tests failed, the failue neither looks to be related to this PR now is it same as before - https://jenkins.ceph.com/job/ceph-api/58053/.

api tests are failing due to this https://tracker.ceph.com/issues/61907

EDIT: Yup, I can see the warnings in the cluster log from the above the api tests link https://jenkins.ceph.com/job/ceph-api/58053/artifact/build/out/cluster.mon.a.log

Thanks @dparmar18

Copy link
Contributor Author

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

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
Contributor Author

rishabh-d-dave commented Jul 12, 2023

Tests were successful - https://tracker.ceph.com/projects/cephfs/wiki/Main#12-July-2023

@vshankar As discussed previously the PR has been tested and results have been posted. Please approve the PR so that I can be merged. :)

Copy link
Contributor

@vshankar vshankar left a comment

Choose a reason for hiding this comment

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

LGTM

@rishabh-d-dave
Copy link
Contributor Author

Somewhat related: #52924 and #52042.

vshankar added a commit to vshankar/ceph that referenced this pull request Feb 29, 2024
Due to ceph#50569 not being backported

Signed-off-by: Venky Shankar <vshankar@redhat.com>
vshankar added a commit to vshankar/ceph that referenced this pull request Feb 29, 2024
Due to ceph#50569 not being backported

Signed-off-by: Venky Shankar <vshankar@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cephfs Ceph File System needs-review nfs tests wip-rishabh-testing Rishabh's testing label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants