From: John Spray Date: Tue, 17 May 2016 13:03:09 +0000 (+0100) Subject: mon: fix metadata dumps for empty lists X-Git-Tag: v10.2.3~15^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=36e5c86469eda59f7d5d15b16e15d0aab81a34fa;p=ceph.git mon: fix metadata dumps for empty lists Because 'r' was set inside loop, these would fail to set it (leaving ENOSYS) if no metadata is present. Signed-off-by: John Spray (cherry picked from commit 5fe4fe4d92f5b2d67896beac9b5b3b48b309a6b4) Conflicts: src/mon/Monitor.cc and src/mon/MDSMonitor.cc changes relate to features that are not backported to jewel --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index f84affbcda0e..5aaee15bf08f 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -3304,6 +3304,7 @@ bool OSDMonitor::preprocess_command(MonOpRequestRef op) goto reply; f->close_section(); } else { + r = 0; f->open_array_section("osd_metadata"); for (int i=0; i