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: v12.2.1~98^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b713cc831da238844a6e42e80e93cb31ee060aad;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 (cherry picked from commit 69038a18070d0cd47dc857020cce115514beaa3d) --- diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index d98a40967baf..b330d78f8c72 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -3363,8 +3363,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()); @@ -4399,8 +4403,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);