From: Sage Weil Date: Mon, 5 Aug 2019 14:20:12 +0000 (-0500) Subject: mon/MgrMap: make print_summary (used by 'ceph -s') more concise X-Git-Tag: v15.1.0~1928^2~5 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=9e0916160d519c65a7f6ed11f88de88dc1994dfa;p=ceph-ci.git mon/MgrMap: make print_summary (used by 'ceph -s') more concise Signed-off-by: Sage Weil --- diff --git a/PendingReleaseNotes b/PendingReleaseNotes index 851dba5b81b..8d8a39cd1a7 100644 --- a/PendingReleaseNotes +++ b/PendingReleaseNotes @@ -100,3 +100,6 @@ * monitors now have a `ceph osd info` command that will provide information on all osds, or provided osds, thus simplifying the process of having to parse `osd dump` for the same information. + +* The `mgrmap` metadata included in the structured ``ceph status`` (``ceph -s``) + output is now more concise. \ No newline at end of file diff --git a/src/mon/MgrMap.h b/src/mon/MgrMap.h index ccd654d961e..c30c8811ed7 100644 --- a/src/mon/MgrMap.h +++ b/src/mon/MgrMap.h @@ -490,7 +490,18 @@ public: // One or the other, not both ceph_assert((ss != nullptr) != (f != nullptr)); if (f) { - dump(f); + f->dump_bool("available", available); + f->dump_int("num_standbys", standbys.size()); + f->open_array_section("modules"); + for (auto& i : modules) { + f->dump_string("module", i); + } + f->close_section(); + f->open_object_section("services"); + for (const auto &i : services) { + f->dump_string(i.first.c_str(), i.second); + } + f->close_section(); } else { utime_t now = ceph_clock_now(); if (get_active_gid() != 0) {