]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr: shutdown py_modules in Mgr::shutdown() 14078/head
authorKefu Chai <kchai@redhat.com>
Wed, 22 Mar 2017 06:10:23 +0000 (14:10 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 29 Mar 2017 11:57:42 +0000 (19:57 +0800)
Fixes: http://tracker.ceph.com/issues/19258
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/mgr/Mgr.cc
src/mgr/PyModules.cc

index facfc2ea646a5913b1306bdedc8e9cafc69c2935..6207cd88db2f4b0160f26c692ba2ae6e6ba90802 100644 (file)
@@ -341,6 +341,9 @@ void Mgr::shutdown()
   // First stop the server so that we're not taking any more incoming requests
   server.shutdown();
 
+  // after the messenger is stopped, signal modules to shutdown via finisher
+  py_modules.shutdown();
+
   // Then stop the finisher to ensure its enqueued contexts aren't going
   // to touch references to the things we're about to tear down
   finisher.wait_for_empty();
index 72eda5e58cde4f36fd98b08e71bc0e8869b5a054..7f2a8f6ca0231deb195d566ebf6108a38f21e1f9 100644 (file)
@@ -460,6 +460,7 @@ void PyModules::shutdown()
   }
   modules.clear();
 
+  PyGILState_Ensure();
   Py_Finalize();
 }