mirror of
https://github.com/ceph/ceph
synced 2025-03-02 14:31:58 +00:00
mon: "mds stat" must open/close section around dump_info
dump_info() got a new field outside the mdsmap section; it's ok for the overall "report", but not for "mds stat". Add an enclosing section in "mds stat". Fix test to expect new level. Fixes: #5718 Signed-off-by: Dan Mick <dan.mick@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
This commit is contained in:
parent
3a69fd0456
commit
e4d0eeefa2
@ -188,9 +188,9 @@ if __name__ == '__main__':
|
||||
assert(r.json['output']['max_mds'] == 4)
|
||||
expect('mds/set_max_mds?maxmds=3', 'PUT', 200, '')
|
||||
r = expect('mds/stat.json', 'GET', 200, 'json')
|
||||
assert('info' in r.json['output'])
|
||||
assert('info' in r.json['output']['mdsmap'])
|
||||
r = expect('mds/stat.xml', 'GET', 200, 'xml')
|
||||
assert(r.tree.find('output/mdsmap/info') is not None)
|
||||
assert(r.tree.find('output/mds_stat/mdsmap/info') is not None)
|
||||
|
||||
# more content tests below, just check format here
|
||||
expect('mon/dump.json', 'GET', 200, 'json')
|
||||
|
@ -563,7 +563,9 @@ bool MDSMonitor::preprocess_command(MMonCommand *m)
|
||||
|
||||
if (prefix == "mds stat") {
|
||||
if (f) {
|
||||
f->open_object_section("mds_stat");
|
||||
dump_info(f.get());
|
||||
f->close_section();
|
||||
f->flush(ds);
|
||||
} else {
|
||||
ds << mdsmap;
|
||||
|
Loading…
Reference in New Issue
Block a user