]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Fix #7187: Include all summary items in JSON health output 1117/head
authorJohn Spray <john.spray@inktank.com>
Mon, 20 Jan 2014 11:08:27 +0000 (11:08 +0000)
committerJohn Spray <john.spray@inktank.com>
Mon, 20 Jan 2014 11:10:29 +0000 (11:10 +0000)
Signed-off-by: John Spray <john.spray@inktank.com>
src/mon/Monitor.cc

index 4d583a0b8a37733475ebc215c19d132f9f75e160..6b88e9994f09c6c9dad643f8547bd6496b9966d7 100644 (file)
@@ -1758,17 +1758,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 << "; ";