From: John Spray Date: Mon, 16 Oct 2017 10:33:48 +0000 (-0400) Subject: mgr: fix py_module_registry shutdown X-Git-Tag: v13.0.1~332^2~11 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0d5b1d70e616d7d1c2d6360375770f5c4754649d;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 --- diff --git a/src/mgr/MgrStandby.cc b/src/mgr/MgrStandby.cc index ef8be150b50d..cd8ec2ca36c0 100644 --- a/src/mgr/MgrStandby.cc +++ b/src/mgr/MgrStandby.cc @@ -194,7 +194,7 @@ void MgrStandby::tick() dout(10) << __func__ << dendl; send_beacon(); - if (active_mgr) { + if (active_mgr && active_mgr->is_initialized()) { active_mgr->tick(); } @@ -220,8 +220,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 @@ -232,6 +230,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