]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr: fix beacon interruption caused by deadlock 26426/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:05:09 +0000 (12:05 +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 6e198d2d44fd83bcc55db26327b599b350d90855..bd28905cdaae246c438cf1ebf77da70acf829909 100644 (file)
@@ -298,9 +298,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);
       });