From: John Spray Date: Tue, 17 May 2016 16:53:56 +0000 (+0100) Subject: mon: tolerate missing osd metadata X-Git-Tag: v10.2.3~15^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f5db5a4b0bb52fed544f277c28ab5088d1c3fc79;p=ceph.git mon: tolerate missing osd metadata Just because one OSD's metadata is missing, don't give up on outputting all the other OSDs' metadata. Signed-off-by: John Spray (cherry picked from commit 2c7dd5f22288c4aee814573baa6af131421f36a4) --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 5aaee15bf08f..da9cd6735a02 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -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(); } }