]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mon: fix two stray legacy get_health() callers
authorSage Weil <sage@redhat.com>
Fri, 25 Aug 2017 22:30:12 +0000 (18:30 -0400)
committerSage Weil <sage@redhat.com>
Fri, 25 Aug 2017 22:30:12 +0000 (18:30 -0400)
These need to call the new method when appropriate.

Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/Monitor.cc

index 3f1f56036e9ec7de71c7cba8b0e3891530687916..de8d01b357a8d5ff53b27f6ca58ac4438bfbbe87 100755 (executable)
@@ -3364,8 +3364,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());
@@ -4400,8 +4404,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);