]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: fix two stray legacy get_health() callers 17332/head
authorSage Weil <sage@redhat.com>
Fri, 25 Aug 2017 22:30:12 +0000 (18:30 -0400)
committerKefu Chai <kchai@redhat.com>
Tue, 29 Aug 2017 03:33:40 +0000 (11:33 +0800)
These need to call the new method when appropriate.

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 69038a18070d0cd47dc857020cce115514beaa3d)

src/mon/Monitor.cc

index d98a40967baf7003fd07f4fcdbea7f6917336c8c..b330d78f8c724968eeaed3c8f08c587eebc2d7e0 100644 (file)
@@ -3363,8 +3363,12 @@ void Monitor::handle_command(MonOpRequestRef op)
       tagstr = tagstr.substr(0, tagstr.find_last_of(' '));
     f->dump_string("tag", tagstr);
 
-    list<string> hs;
-    get_health(hs, NULL, f.get());
+    if (osdmon()->osdmap.require_osd_release >= CEPH_RELEASE_LUMINOUS) {
+      get_health_status(true, f.get(), nullptr);
+    } else {
+      list<string> health_str;
+      get_health(health_str, nullptr, f.get());
+    }
 
     monmon()->dump_info(f.get());
     osdmon()->dump_info(f.get());
@@ -4399,8 +4403,13 @@ void Monitor::handle_ping(MonOpRequestRef op)
   boost::scoped_ptr<Formatter> f(new JSONFormatter(true));
   f->open_object_section("pong");
 
-  list<string> health_str;
-  get_health(health_str, NULL, f.get());
+  if (osdmon()->osdmap.require_osd_release >= CEPH_RELEASE_LUMINOUS) {
+    get_health_status(false, f.get(), nullptr);
+  } else {
+    list<string> health_str;
+    get_health(health_str, nullptr, f.get());
+  }
+
   {
     stringstream ss;
     get_mon_status(f.get(), ss);