]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: Monitor: s/_mon_status()/get_mon_status()/ 1526/head
authorJoao Eduardo Luis <joao.luis@inktank.com>
Mon, 24 Mar 2014 10:48:37 +0000 (10:48 +0000)
committerJoao Eduardo Luis <joao.luis@inktank.com>
Mon, 24 Mar 2014 14:43:21 +0000 (14:43 +0000)
'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 <joao.luis@inktank.com>
src/mon/Monitor.cc
src/mon/Monitor.h

index 69b32a5229dd738459883ae34b0431218deb1137..c767a89d7a19eba60cf963b4527bd096c671c094 100644 (file)
@@ -260,7 +260,7 @@ void Monitor::do_admin_command(string command, cmdmap_t& cmdmap, string format,
   boost::scoped_ptr<Formatter> 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();
index 65b57053ecbffcb79eb12394b5ba1262653740ff..8e04634aadadbfb89f8e3352448a1bb04b30cda9 100644 (file)
@@ -618,7 +618,7 @@ public:
                         const map<string,cmd_vartype>& cmdmap,
                         const map<string,string>& 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);