mirror of
https://github.com/ceph/ceph
synced 2024-12-27 14:03:25 +00:00
rbd: fix json formatting for image and journal status output
Fixes: http://tracker.ceph.com/issues/18261 Signed-off-by: Mykola Golub <mgolub@mirantis.com>
This commit is contained in:
parent
8d7d5ae3ff
commit
4c2659a0f4
@ -111,10 +111,12 @@ static int do_show_journal_status(librados::IoCtx& io_ctx,
|
||||
f->open_object_section("status");
|
||||
f->dump_unsigned("minimum_set", minimum_set);
|
||||
f->dump_unsigned("active_set", active_set);
|
||||
f->open_object_section("registered_clients");
|
||||
f->open_array_section("registered_clients");
|
||||
for (std::set<cls::journal::Client>::iterator c =
|
||||
registered_clients.begin(); c != registered_clients.end(); ++c) {
|
||||
f->open_object_section("client");
|
||||
c->dump(f);
|
||||
f->close_section();
|
||||
}
|
||||
f->close_section();
|
||||
f->close_section();
|
||||
|
@ -50,7 +50,7 @@ static int do_show_status(librados::IoCtx &io_ctx, librbd::Image &image,
|
||||
f->open_object_section("status");
|
||||
|
||||
if (f) {
|
||||
f->open_object_section("watchers");
|
||||
f->open_array_section("watchers");
|
||||
for (std::list<obj_watch_t>::iterator i = watchers.begin(); i != watchers.end(); ++i) {
|
||||
f->open_object_section("watcher");
|
||||
f->dump_string("address", i->addr);
|
||||
|
Loading…
Reference in New Issue
Block a user