From: John Spray Date: Mon, 16 Oct 2017 10:33:48 +0000 (-0400) Subject: mgr: fix py_module_registry shutdown X-Git-Tag: v12.2.2~61^2~14 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b1307e074b5fb708420686bf814bd4a7aa76f6d8;p=ceph.git mgr: fix py_module_registry shutdown Was calling way too early, which did a Py_Finalize before the modules had been joined. Signed-off-by: John Spray (cherry picked from commit 0d5b1d70e616d7d1c2d6360375770f5c4754649d) --- diff --git a/src/mgr/MgrStandby.cc b/src/mgr/MgrStandby.cc index 62eb294f95a6..171add02f876 100644 --- a/src/mgr/MgrStandby.cc +++ b/src/mgr/MgrStandby.cc @@ -193,7 +193,7 @@ void MgrStandby::tick() dout(10) << __func__ << dendl; send_beacon(); - if (active_mgr) { + if (active_mgr && active_mgr->is_initialized()) { active_mgr->tick(); } @@ -219,8 +219,6 @@ void MgrStandby::shutdown() dout(4) << "Shutting down" << dendl; - py_module_registry.shutdown(); - // stop sending beacon first, i use monc to talk with monitors timer.shutdown(); // client uses monc and objecter @@ -231,6 +229,9 @@ void MgrStandby::shutdown() if (active_mgr) { active_mgr->shutdown(); } + + py_module_registry.shutdown(); + // objecter is used by monc and active_mgr objecter.shutdown(); // client_messenger is used by all of them, so stop it in the end