From 3f014dade0e662b5a3688d5ae55c597fe749348f Mon Sep 17 00:00:00 2001 From: Joao Eduardo Luis Date: Mon, 24 Mar 2014 10:48:37 +0000 Subject: [PATCH] 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 --- src/mon/Monitor.cc | 8 ++++---- src/mon/Monitor.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index 69b32a5229d..c767a89d7a1 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 65b57053ecb..8e04634aada 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); -- 2.47.3