]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: tolerate missing osd metadata 9097/head
authorJohn Spray <john.spray@redhat.com>
Tue, 17 May 2016 16:53:56 +0000 (17:53 +0100)
committerJohn Spray <john.spray@redhat.com>
Sat, 21 May 2016 21:38:15 +0000 (22:38 +0100)
Just because one OSD's metadata is missing,
don't give up on outputting all the other
OSDs' metadata.

Signed-off-by: John Spray <john.spray@redhat.com>
src/mon/OSDMonitor.cc

index 60ce607ccdfcd2783ff09d9677576ffe502c2f82..4f69979bfe3390328c9cc3d8fb66403ecb53b26c 100644 (file)
@@ -3245,8 +3245,15 @@ bool OSDMonitor::preprocess_command(MonOpRequestRef op)
           f->open_object_section("osd");
           f->dump_unsigned("id", i);
           r = dump_osd_metadata(i, f.get(), NULL);
-          if (r < 0)
+          if (r == -EINVAL || r == -ENOENT) {
+            // Drop error, continue to get other daemons' metadata
+            dout(4) << "No metadata for osd." << i << dendl;
+            r = 0;
+            continue;
+          } else if (r < 0) {
+            // Unexpected error
             goto reply;
+          }
           f->close_section();
         }
       }