From f3eda6349485ac84b83e4f66f7180a76baa9baca Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 29 Jul 2013 13:13:24 -0700 Subject: [PATCH] mon/PGMonitor: fix 'pg dump_[pools_]json' Use the correct type for the dumpcontents arg. Fixes the dump_pools_json output and avoids these errors: 2013-07-29 13:09:14.089188 7fa0c5d21700 -1 0x7fa0c5d1e7a8 2013-07-29 13:09:16.306560 7fa0c5d21700 -1 bad boost::get: key dumpcontents is not type std::vector > 2013-07-29 13:09:16.317104 7fa0c5d21700 -1 0x7fa0c5d1e7a8 2013-07-29 13:09:16.317136 7fa0c5d21700 -1 bad boost::get: key dumpcontents is not type std::vector > Fixes: #5786 Signed-off-by: Sage Weil --- src/mon/PGMonitor.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/mon/PGMonitor.cc b/src/mon/PGMonitor.cc index d86cbe70c19fd..93b0b0b3828ce 100644 --- a/src/mon/PGMonitor.cc +++ b/src/mon/PGMonitor.cc @@ -1332,12 +1332,16 @@ bool PGMonitor::preprocess_command(MMonCommand *m) // perhaps these would be better in the parsing, but it's weird if (prefix == "pg dump_json") { + vector v; + v.push_back(string("all")); cmd_putval(g_ceph_context, cmdmap, "format", string("json")); - cmd_putval(g_ceph_context, cmdmap, "dumpcontents", string("all")); + cmd_putval(g_ceph_context, cmdmap, "dumpcontents", v); prefix = "pg dump"; } else if (prefix == "pg dump_pools_json") { + vector v; + v.push_back(string("pools")); cmd_putval(g_ceph_context, cmdmap, "format", string("json")); - cmd_putval(g_ceph_context, cmdmap, "dumpcontents", string("pool")); + cmd_putval(g_ceph_context, cmdmap, "dumpcontents", v); prefix = "pg dump"; } -- 2.39.5