]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Fixed JSON output for stray OSDs 2721/head
authorWyllys Ingersoll <wyllys.ingersoll@keepertech.com>
Fri, 10 Oct 2014 12:27:56 +0000 (08:27 -0400)
committerWyllys Ingersoll <wyllys.ingersoll@keepertech.com>
Fri, 10 Oct 2014 12:27:56 +0000 (08:27 -0400)
src/osd/OSDMap.cc

index ed9b7e7ecf6b41bbc2187dbafe26c94b00d0810b..2d74fd79d440032c5238be9b93069a4e5cb50a8a 100644 (file)
@@ -2446,17 +2446,17 @@ void OSDMap::print_tree(ostream *out, Formatter *f) const
   if (!stray.empty()) {
     if (out)
       *out << "\n";
-    if (f)
-      f->open_object_section("osd");
     for (set<int>::iterator p = stray.begin(); p != stray.end(); ++p) {
       if (out)
        *out << *p << "\t0\t";
+      if (f)
+        f->open_object_section("osd");
       print_osd_line(*p, out, f);
       if (out)
        *out << "\n";
+      if (f)
+        f->close_section();
     }
-    if (f)
-      f->close_section();
   }
   if (f)
     f->close_section();