diff options
author | Sage Weil <sage@inktank.com> | 2013-07-23 14:42:55 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-07-23 14:42:55 -0700 |
commit | 612a9b35c0065efa036cc0cd49196cec8d4e53d8 (patch) | |
tree | 1413bbc8dae3e4761c7a11b3116389601fb3b8a8 /src/mon/Monitor.cc | |
parent | cfabede9ba586cdc0636f0429a94746a3a9997ae (diff) | |
download | ceph-612a9b35c0065efa036cc0cd49196cec8d4e53d8.tar.gz |
mon: add quorum_names to quorum_status command output
Signed-off-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'src/mon/Monitor.cc')
-rw-r--r-- | src/mon/Monitor.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index 957f0c7f5ca..9492f7c9168 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -1589,6 +1589,14 @@ void Monitor::_quorum_status(Formatter *f, ostream& ss) f->dump_int("mon", *p); f->close_section(); // quorum + set<string> quorum_names = get_quorum_names(); + f->open_array_section("quorum_names"); + for (set<string>::iterator p = quorum_names.begin(); p != quorum_names.end(); ++p) + f->dump_string("mon", *p); + f->close_section(); // quorum_names + + f->dump_string("quorum_leader_name", quorum.empty() ? string() : monmap->get_name(*quorum.begin())); + f->open_object_section("monmap"); monmap->dump(f); f->close_section(); // monmap |