From: Sage Weil Date: Fri, 25 Aug 2017 22:30:12 +0000 (-0400) Subject: mon: fix two stray legacy get_health() callers X-Git-Tag: v13.0.1~1153^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=69038a18070d0cd47dc857020cce115514beaa3d;p=ceph.git mon: fix two stray legacy get_health() callers These need to call the new method when appropriate. Signed-off-by: Sage Weil --- diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index 3f1f56036e9e..de8d01b357a8 100755 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -3364,8 +3364,12 @@ void Monitor::handle_command(MonOpRequestRef op) tagstr = tagstr.substr(0, tagstr.find_last_of(' ')); f->dump_string("tag", tagstr); - list 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 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 f(new JSONFormatter(true)); f->open_object_section("pong"); - list 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 health_str; + get_health(health_str, nullptr, f.get()); + } + { stringstream ss; get_mon_status(f.get(), ss);