From: John Spray Date: Mon, 20 Jan 2014 11:08:27 +0000 (+0000) Subject: Fix #7187: Include all summary items in JSON health output X-Git-Tag: v0.67.6~37 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a2e34b8d322e571600d6c0a3ff363f9910196f28;p=ceph.git Fix #7187: Include all summary items in JSON health output Signed-off-by: John Spray (cherry picked from commit fdf3b5520d150f14d90bdfc569b70c07b0579b38) --- diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index 74330d11e3c7..119ca4b07615 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -1739,17 +1739,17 @@ void Monitor::get_health(string& status, bufferlist *detailbl, Formatter *f) stringstream ss; health_status_t overall = HEALTH_OK; if (!summary.empty()) { - if (f) { - f->open_object_section("item"); - f->dump_stream("severity") << summary.front().first; - f->dump_string("summary", summary.front().second); - f->close_section(); - } ss << ' '; while (!summary.empty()) { if (overall > summary.front().first) overall = summary.front().first; ss << summary.front().second; + if (f) { + f->open_object_section("item"); + f->dump_stream("severity") << summary.front().first; + f->dump_string("summary", summary.front().second); + f->close_section(); + } summary.pop_front(); if (!summary.empty()) ss << "; ";