]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: tolerate missing osd metadata 10654/head
authorJohn Spray <john.spray@redhat.com>
Tue, 17 May 2016 16:53:56 +0000 (17:53 +0100)
committerLoic Dachary <ldachary@redhat.com>
Wed, 10 Aug 2016 10:37:48 +0000 (12:37 +0200)
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>
(cherry picked from commit 2c7dd5f22288c4aee814573baa6af131421f36a4)

src/mon/OSDMonitor.cc

index 5aaee15bf08fba0acd115ca2b33cbc95aa1c30d2..da9cd6735a020abfc1f5e074bc7b3e16ac54fd9f 100644 (file)
@@ -3311,8 +3311,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();
         }
       }