]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: make mon summary more concise in 'ceph -s' 37706/head
authorSage Weil <sage@redhat.com>
Mon, 5 Aug 2019 14:38:28 +0000 (09:38 -0500)
committerNathan Cutler <ncutler@suse.com>
Sat, 21 Nov 2020 15:42:10 +0000 (16:42 +0100)
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 3e7c185bd4b2312f9801b8664fb175801c904871)

Conflicts:
PendingReleaseNotes
- drop already published release notes
        src/mon/MonMap.cc
- change ceph::to_string to std::to_string

PendingReleaseNotes
src/mon/MonMap.cc
src/mon/MonMap.h
src/mon/Monitor.cc

index b626ee5fd19343782531b6013b697546de007008..1722a43bfaff36808a787669e66847bd038d81fe 100644 (file)
@@ -4,9 +4,6 @@
 * MGR: progress module can now be turned on/off, using the commands:
   ``ceph progress on`` and ``ceph progress off``.
 
-14.2.13
--------
-
-* This release fixes a regression introduced in 14.2.12 which broke deployments
-  that referred to MON hosts using DNS names instead of IP addresses in the
-  ``mon_host`` parameter in ``/etc/ceph/ceph.conf``.
+* The structured output of ``ceph status`` or ``ceph -s`` is now more
+  concise, particularly the ``mgrmap`` and ``monmap`` sections, and the
+  structure of the ``osdmap`` section has been cleaned up.
index 64179a53cb90595a0384f073aabee626dc5a8d51..9458ad1cc90cccda1101e11cf6a6cb3101c4a256 100644 (file)
@@ -360,6 +360,14 @@ void MonMap::dump(Formatter *f) const
   f->close_section();
 }
 
+void MonMap::dump_summary(Formatter *f) const
+{
+  f->dump_unsigned("epoch", epoch);
+  f->dump_string("min_mon_release_name", std::to_string(min_mon_release));
+  f->dump_unsigned("num_mons", ranks.size());
+}
+
+
 // an ambiguous mon addr may be legacy or may be msgr2--we aren' sure.
 // when that happens we need to try them both (unless we can
 // reasonably infer from the port number which it is).
index 25403923e21bf341c59c1424f60704cb97bae268..522f4edaf62307392df9e28481d71461b6eb45f3 100644 (file)
@@ -433,6 +433,7 @@ public:
   void print(ostream& out) const;
   void print_summary(ostream& out) const;
   void dump(ceph::Formatter *f) const;
+  void dump_summary(ceph::Formatter *f) const;
 
   static void generate_test_instances(list<MonMap*>& o);
 protected:
index a01cd522702e9e8b9c2117a94be2310ca6c2a2ef..793031d21c65b22871385ac1eff49ac0dbbb5be7 100644 (file)
@@ -2955,7 +2955,7 @@ void Monitor::get_cluster_status(stringstream &ss, Formatter *f)
          mono_clock::now() - quorum_since).count());
     }
     f->open_object_section("monmap");
-    monmap->dump(f);
+    monmap->dump_summary(f);
     f->close_section();
     f->open_object_section("osdmap");
     osdmon()->osdmap.print_summary(f, cout, string(12, ' '));