Skip to content

mgr_util: add CephfsClient implementation#32319

Merged
sebastian-philipp merged 3 commits intoceph:masterfrom
jan--f:pybind-mgr-util-cephfs-con-pool
Mar 20, 2020
Merged

mgr_util: add CephfsClient implementation#32319
sebastian-philipp merged 3 commits intoceph:masterfrom
jan--f:pybind-mgr-util-cephfs-con-pool

Conversation

@jan--f
Copy link
Contributor

@jan--f jan--f commented Dec 18, 2019

This pulls parts of the VolumesClient implementation into mgr_util to
make the CephFS specific pieces available to other mgr modules. To
reduce code dumplication the VolumeClient now extends the CephfsClient
class to add the volume specific methods.

Signed-off-by: Jan Fajerski jfajerski@suse.com

I did some of this originally in #29489. This is an update with some changes the VolumeClient received in the mean time. One change is that the connection_pool_wrap is now a static method (it doesn't need to be an object method) and that it doesn't replace the fs_name with a fs_handle but returns an object that should behave just like the fs_name string but also contains the handle.
This is more of an RFC, but I think its useful to have a basic CephfsClient implementation in mgr_util.

Checklist

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

Show available Jenkins commands
  • jenkins retest this please
  • 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 backend
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

@jan--f jan--f added cephfs Ceph File System pybind labels Dec 18, 2019
@jan--f jan--f requested review from ajarr, batrick and vshankar December 18, 2019 10:43
@sebastian-philipp
Copy link
Contributor

sebastian-philipp commented Dec 18, 2019

Already fixed with #32597

mind adding

diff --git a/src/pybind/mgr/tox.ini b/src/pybind/mgr/tox.ini
index 7cce321c68..396ed3c7c5 100644
--- a/src/pybind/mgr/tox.ini
+++ b/src/pybind/mgr/tox.ini
@@ -12,4 +12,4 @@ basepython = python3
 deps =
     -r requirements.txt
     mypy
-commands = mypy --config-file=../../mypy.ini orchestrator.py cephadm/module.py rook/module.py ansible/module.py
\ No newline at end of file
+commands = mypy --config-file=../../mypy.ini orchestrator.py mgr_util.py cephadm/module.py rook/module.py ansible/module.py
\ No newline at end of file

to your PR?

@batrick
Copy link
Member

batrick commented Dec 18, 2019

deferring to @vshankar on this one

@vshankar vshankar self-assigned this Dec 19, 2019
@vshankar
Copy link
Contributor

Thanks @jan--f -- I was planning to work on this today!

@sebastian-philipp
Copy link
Contributor

jenkins test make check

@sebastian-philipp
Copy link
Contributor

mgr_util.py: note: In member "disconnect" of class "Connection":
mgr_util.py:110: error: Item "None" of "Optional[Any]" has no attribute "get_addrs"
mgr_util.py:111: error: Item "None" of "Optional[Any]" has no attribute "shutdown"
mgr_util.py: note: In member "abort" of class "Connection":
mgr_util.py:118: error: Item "None" of "Optional[Any]" has no attribute "abort_conn"
mgr_util.py: note: In member "run" of class "RTimer":
mgr_util.py:127: error: "RTimer" has no attribute "finished"
mgr_util.py:128: error: "RTimer" has no attribute "finished"
mgr_util.py:128: error: "RTimer" has no attribute "interval"
mgr_util.py:129: error: "RTimer" has no attribute "function"
mgr_util.py:129: error: "RTimer" has no attribute "args"
mgr_util.py:129: error: "RTimer" has no attribute "kwargs"
mgr_util.py:130: error: "RTimer" has no attribute "finished"
mgr_util.py: note: In member "shutdown" of class "CephfsClient":
mgr_util.py:222: error: "CephfsClient" has no attribute "purge_queue"

jan--f pushed a commit to jan--f/ceph that referenced this pull request Jan 16, 2020
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
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.

needs rebase.

@jan--f note that with the recent change to mgr/volumes plugin, I removed the dependency on connection_pool_wrap decorator. I'm ok with still having it if there are users.

@jan--f jan--f force-pushed the pybind-mgr-util-cephfs-con-pool branch from 11f9425 to df03d2f Compare January 23, 2020 13:59
@jan--f jan--f requested a review from vshankar January 23, 2020 13:59
@jan--f
Copy link
Contributor Author

jan--f commented Jan 23, 2020

Updated things according to recent changes in the volumes implementation

jan--f pushed a commit to jan--f/ceph that referenced this pull request Jan 24, 2020
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
jan--f pushed a commit to jan--f/ceph that referenced this pull request Jan 24, 2020
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
jan--f pushed a commit to jan--f/ceph that referenced this pull request Jan 24, 2020
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
@jan--f jan--f force-pushed the pybind-mgr-util-cephfs-con-pool branch from df03d2f to 87726d7 Compare February 10, 2020 14:01
jan--f pushed a commit to jan--f/ceph that referenced this pull request Feb 10, 2020
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
@jan--f jan--f requested a review from vshankar February 11, 2020 09:35
jan--f pushed a commit to jan--f/ceph that referenced this pull request Feb 13, 2020
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
@jan--f
Copy link
Contributor Author

jan--f commented Mar 12, 2020

ping @vshankar

@jan--f
Copy link
Contributor Author

jan--f commented Mar 18, 2020

@vshankar Anything still blocking this?

@vshankar
Copy link
Contributor

@vshankar Anything still blocking this?

nothing -- got busy elsewhere. Will schedule test soon.

@vshankar
Copy link
Contributor

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

@sebastian-philipp sebastian-philipp merged commit 8c681d2 into ceph:master Mar 20, 2020
jan--f pushed a commit to jan--f/ceph that referenced this pull request Apr 2, 2020
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
jan--f pushed a commit to jan--f/ceph that referenced this pull request Apr 2, 2020
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
vshankar pushed a commit to vshankar/ceph that referenced this pull request Apr 14, 2020
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
vshankar pushed a commit to vshankar/ceph that referenced this pull request Apr 14, 2020
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
jan--f pushed a commit to jan--f/ceph that referenced this pull request Apr 16, 2020
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
jan--f pushed a commit to jan--f/ceph that referenced this pull request Apr 16, 2020
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
jan--f pushed a commit to jan--f/ceph that referenced this pull request Apr 16, 2020
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
jan--f pushed a commit to jan--f/ceph that referenced this pull request Apr 16, 2020
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
vshankar pushed a commit to ceph/ceph-ci that referenced this pull request Apr 28, 2020
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
jan--f pushed a commit to jan--f/ceph that referenced this pull request Apr 30, 2020
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
jan--f pushed a commit to jan--f/ceph that referenced this pull request Apr 30, 2020
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
vshankar pushed a commit to vshankar/ceph that referenced this pull request Apr 30, 2020
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
vshankar pushed a commit to vshankar/ceph that referenced this pull request Apr 30, 2020
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
jan--f pushed a commit to jan--f/ceph that referenced this pull request May 4, 2020
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
jan--f pushed a commit to jan--f/ceph that referenced this pull request May 4, 2020
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cephfs Ceph File System pybind

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants