]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr: fix py_module_registry shutdown
authorJohn Spray <john.spray@redhat.com>
Mon, 16 Oct 2017 10:33:48 +0000 (06:33 -0400)
committerJohn Spray <john.spray@redhat.com>
Wed, 1 Nov 2017 12:20:22 +0000 (08:20 -0400)
Was calling way too early, which did a
Py_Finalize before the modules had been
joined.

Signed-off-by: John Spray <john.spray@redhat.com>
src/mgr/MgrStandby.cc

index ef8be150b50d88a95477a666090efbfcd04229ef..cd8ec2ca36c01fa2b8b8eea0325df1486a5b3879 100644 (file)
@@ -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