From: Yan Jun Date: Wed, 8 Aug 2018 07:24:37 +0000 (+0800) Subject: mgr: fix beacon interruption caused by deadlock X-Git-Tag: v12.2.12~49^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4df60f74c2654ae17fe5c2e7d2a7720419219e1c;p=ceph.git mgr: fix beacon interruption caused by deadlock There is potential deadlock between this code and DaemonServer::send_report() Signed-off-by: Yan Jun (cherry picked from commit 70e56269b1a459d6b0e7b23bc3037602963ea5c2) --- diff --git a/src/mgr/ActivePyModules.cc b/src/mgr/ActivePyModules.cc index ea7128c53996..56e87d7a98a4 100644 --- a/src/mgr/ActivePyModules.cc +++ b/src/mgr/ActivePyModules.cc @@ -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); });