From 68d411cf7b934c724f1f8ebeaa7148daebd79599 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 11 Jul 2017 16:25:42 -0400 Subject: [PATCH] mgr/PyModules: add 'pg_status' dump This is summary info, same as what's in 'ceph status'. Signed-off-by: Sage Weil (cherry picked from commit 85b5b80906d00e098d4b1af1354c60a357022dd2) --- src/mgr/PyModules.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/mgr/PyModules.cc b/src/mgr/PyModules.cc index 6b3b50e599c9f..ef3ba72fe6520 100644 --- a/src/mgr/PyModules.cc +++ b/src/mgr/PyModules.cc @@ -264,6 +264,14 @@ PyObject *PyModules::get_python(const std::string &what) } ); return f.get(); + } else if (what == "pg_status") { + PyFormatter f; + cluster_state.with_pgmap( + [&f](const PGMap &pg_map) { + pg_map.print_summary(&f, nullptr); + } + ); + return f.get(); } else if (what == "df") { PyFormatter f; -- 2.39.5