]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/PGMonitor: fix 'pg dump_[pools_]json'
authorSage Weil <sage@inktank.com>
Mon, 29 Jul 2013 20:13:24 +0000 (13:13 -0700)
committerSage Weil <sage@inktank.com>
Mon, 29 Jul 2013 20:13:24 +0000 (13:13 -0700)
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<std::string, std::allocator<std::string> >
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<std::string, std::allocator<std::string> >

Fixes: #5786
Signed-off-by: Sage Weil <sage@inktank.com>
src/mon/PGMonitor.cc

index d86cbe70c19fdeea19284302f753e2f99cf2c6b8..93b0b0b3828cef19e443ffbc76d8c516fb2de311 100644 (file)
@@ -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<string> 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<string> 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";
   }