diff options
author | Sage Weil <sage@inktank.com> | 2013-07-29 13:13:24 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-07-29 13:13:24 -0700 |
commit | f3eda6349485ac84b83e4f66f7180a76baa9baca (patch) | |
tree | 4b5e4f7e645fbcaeff1c5864157d959e8ddb38af | |
parent | 099ac5184d05d87b7aaf116d2c131a496e3dd718 (diff) | |
download | ceph-f3eda6349485ac84b83e4f66f7180a76baa9baca.tar.gz |
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<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>
-rw-r--r-- | src/mon/PGMonitor.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mon/PGMonitor.cc b/src/mon/PGMonitor.cc index d86cbe70c19..93b0b0b3828 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<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"; } |