From: Joao Eduardo Luis Date: Mon, 24 Mar 2014 10:48:37 +0000 (+0000) Subject: mon: Monitor: s/_mon_status()/get_mon_status()/ X-Git-Tag: v0.79~99^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F1526%2Fhead;p=ceph.git mon: Monitor: s/_mon_status()/get_mon_status()/ 'Monitor::_mon_status()' provides status specific to the monitor being poked. This is information that does not necessarily relate with cluster status, and can even be obtained when there's no quorum (via the admin socket). We change the function name to make the distinction between mon-specific status and cluster-status, which is obtained via a different function. Signed-off-by: Joao Eduardo Luis --- diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index 69b32a5229dd..c767a89d7a19 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -260,7 +260,7 @@ void Monitor::do_admin_command(string command, cmdmap_t& cmdmap, string format, boost::scoped_ptr f(new_formatter(format)); if (command == "mon_status") { - _mon_status(f.get(), ss); + get_mon_status(f.get(), ss); if (f) f->flush(ss); } else if (command == "quorum_status") @@ -1740,7 +1740,7 @@ void Monitor::_quorum_status(Formatter *f, ostream& ss) delete f; } -void Monitor::_mon_status(Formatter *f, ostream& ss) +void Monitor::get_mon_status(Formatter *f, ostream& ss) { bool free_formatter = false; @@ -2375,7 +2375,7 @@ void Monitor::handle_command(MMonCommand *m) rs = ""; r = 0; } else if (prefix == "mon_status") { - _mon_status(f.get(), ds); + get_mon_status(f.get(), ds); if (f) f->flush(ds); rdata.append(ds); @@ -3042,7 +3042,7 @@ void Monitor::handle_ping(MPing *m) get_health(health_str, NULL, f); { stringstream ss; - _mon_status(f, ss); + get_mon_status(f, ss); } f->close_section(); diff --git a/src/mon/Monitor.h b/src/mon/Monitor.h index 65b57053ecbf..8e04634aadad 100644 --- a/src/mon/Monitor.h +++ b/src/mon/Monitor.h @@ -618,7 +618,7 @@ public: const map& cmdmap, const map& param_str_map, const MonCommand *this_cmd); - void _mon_status(Formatter *f, ostream& ss); + void get_mon_status(Formatter *f, ostream& ss); void _quorum_status(Formatter *f, ostream& ss); void _osdmonitor_prepare_command(cmdmap_t& cmdmap, ostream& ss); void _add_bootstrap_peer_hint(string cmd, cmdmap_t& cmdmap, ostream& ss);