Skip to content
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

mgr: add machinery for python modules to send MCommands to daemons #14920

merged 8 commits into from May 5, 2017


None yet
1 participant
Copy link

tchaikov commented May 3, 2017

This is spun off from #13725

// this PR is #14579 rebased agains master, so it can be merged sooner

John Spray added some commits Feb 4, 2017

mgr: expose Objecter to PyModules
Same motivation as exposing MonClient: so that modules
can get at the command sending code.

Signed-off-by: John Spray <>
mgr: expose `tell` (MMonCommand) functionality
To enable plugins to talk directly to daemons when they
want to.

Signed-off-by: John Spray <>
vstart: give mgr full mds/osd caps for `tell`
Signed-off-by: John Spray <>
pybind/rados: enable construction with CephContext
The CephContext pointer is passed around inside
a Python capsule.  It would have initially been
created by some other (non-cython) bit of C++
code, such as ceph-mgr.

This enables mgr modules to instantiate librados
with all the same config/auth/id as the mgr daemon
that they are running within.  Useful if you
want to spin up e.g. a librbd instance.

Signed-off-by: John Spray <>
mgr: add get_context() to python interface
For modules that would like a CephContext* inside
a capsule, suitable for passing to librados constructor.

Signed-off-by: John Spray <>

@tchaikov tchaikov requested review from jcsp and liewegas May 3, 2017

@tchaikov tchaikov force-pushed the tchaikov:wip-14579 branch from 59453fe to 346757a May 3, 2017


This comment has been minimized.

Copy link
Contributor Author

tchaikov commented May 3, 2017


  • rebased against master
  • updated to s/Client/StandaloneClient/
  • make StandaloneClient::init() and StandaloneClient::shutdown() virtual, so we don't call the parent implementation via StandaloneClient pointer by mistake. we could expose the the parent methods using using declaration, but that's more tedious in comparison with "unused return value of init()".

John Spray added some commits Mar 30, 2017

client: enable using external Objecter
To enable places that already have an objecter
(such as ceph-mgr) to avoid spinning up another
one inside Client.

This will also be a path to re-using the librados
objecter in multiple instances of libcephfs in the
same process, a la nfs-ganesha.

Signed-off-by: John Spray <>
mgr: embed Client instance for mds_command
Now plugins can talk to MDS daemons.

Signed-off-by: John Spray <>
systemd: update mgr auth caps
Granting it 'allow *' on mon and osd so that
it can use MCommand to remote control daemons.

Signed-off-by: John Spray <>

@tchaikov tchaikov force-pushed the tchaikov:wip-14579 branch from 346757a to 43d26b9 May 3, 2017


This comment has been minimized.

Copy link
Contributor Author

tchaikov commented May 5, 2017

@tchaikov tchaikov merged commit 8ecdf9a into ceph:master May 5, 2017

2 of 3 checks passed

default Build finished.
Signed-off-by all commits in this PR are signed
Unmodifed Submodules submodules for project are unmodified

@tchaikov tchaikov deleted the tchaikov:wip-14579 branch May 5, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.