]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr: fix beacon interruption caused by deadlock 26427/head
authorYan Jun <yan.jun8@zte.com.cn>
Wed, 8 Aug 2018 07:24:37 +0000 (15:24 +0800)
committerNathan Cutler <ncutler@suse.com>
Thu, 14 Feb 2019 11:06:25 +0000 (12:06 +0100)
There is potential deadlock between this code and DaemonServer::send_report()

Signed-off-by: Yan Jun <yan.jun8@zte.com.cn>
(cherry picked from commit 70e56269b1a459d6b0e7b23bc3037602963ea5c2)

src/mgr/ActivePyModules.cc

index ea7128c53996fc4d0c89e61489b729571be89759..56e87d7a98a48ef9c7265bb65da141fb3f8f6e34 100644 (file)
@@ -289,9 +289,9 @@ PyObject *ActivePyModules::get_python(const std::string &what)
   } else if (what == "df") {
     PyFormatter f;
 
-    cluster_state.with_osdmap([this, &f](const OSDMap &osd_map){
-      cluster_state.with_pgmap(
-          [&osd_map, &f](const PGMap &pg_map) {
+    cluster_state.with_pgmap([this, &f](const PGMap &pg_map) {
+      cluster_state.with_osdmap(
+          [&pg_map, &f](const OSDMap &osd_map) {
         pg_map.dump_fs_stats(nullptr, &f, true);
         pg_map.dump_pool_stats_full(osd_map, nullptr, &f, true);
       });