]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/MgrMap: make print_summary (used by 'ceph -s') more concise
authorSage Weil <sage@redhat.com>
Mon, 5 Aug 2019 14:20:12 +0000 (09:20 -0500)
committerSage Weil <sage@redhat.com>
Mon, 5 Aug 2019 14:20:12 +0000 (09:20 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
PendingReleaseNotes
src/mon/MgrMap.h

index 851dba5b81b214e5bac856d6e9c2f80da84c8197..8d8a39cd1a74658d6efa180a8e0fd7d1279d8ee0 100644 (file)
 * 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
index ccd654d961eb2dca0063177a2a9372f28939f146..c30c8811ed7a5921f7493319c2a27cc91ed7d051 100644 (file)
@@ -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) {