From f3aadbf6288a6c49e2c27834389c5d0dd4adc2e0 Mon Sep 17 00:00:00 2001 From: Tim Serong Date: Wed, 11 Apr 2018 20:33:05 +1000 Subject: [PATCH] doc/mgr: Add limitations section to plugin guide Signed-off-by: Tim Serong --- doc/mgr/plugins.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/mgr/plugins.rst b/doc/mgr/plugins.rst index 9e73b7a58cdf2..ecf2943d39f60 100644 --- a/doc/mgr/plugins.rst +++ b/doc/mgr/plugins.rst @@ -193,6 +193,15 @@ If a module implements the ``serve()`` method, it should also implement the ``shutdown()`` method to shutdown cleanly: misbehaving modules may otherwise prevent clean shutdown of ceph-mgr. +Limitations +----------- + +It is not possible to call back into C++ code from a module's +``__init__()`` method. For example calling ``self.get_config()`` at +this point will result in an assertion failure in ceph-mgr. For modules +that implement the ``serve()`` method, it usually makes sense to do most +initialization inside that method instead. + Is something missing? --------------------- -- 2.39.5