From 69038a18070d0cd47dc857020cce115514beaa3d Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 25 Aug 2017 18:30:12 -0400 Subject: [PATCH] mon: fix two stray legacy get_health() callers These need to call the new method when appropriate. Signed-off-by: Sage Weil --- src/mon/Monitor.cc | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index 3f1f56036e9..de8d01b357a 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); -- 2.39.5