From: Yan Jun Date: Wed, 8 Aug 2018 07:24:37 +0000 (+0800) Subject: mgr: fix beacon interruption caused by deadlock X-Git-Tag: v13.2.5~8^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F26426%2Fhead;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 6e198d2d44fd..bd28905cdaae 100644 --- a/src/mgr/ActivePyModules.cc +++ b/src/mgr/ActivePyModules.cc @@ -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); });