mgr: fix beacon interruption caused by deadlock

There is potential deadlock between this code and DaemonServer::send_report()

Signed-off-by: Yan Jun <yan.jun8@zte.com.cn>
This commit is contained in:
Yan Jun 2018-08-08 15:24:37 +08:00
parent bfd0cde8ff
commit 70e56269b1

View File

@ -314,9 +314,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);
});