diff --git a/PendingReleaseNotes b/PendingReleaseNotes index 8922cec2eba..ee75b317fa0 100644 --- a/PendingReleaseNotes +++ b/PendingReleaseNotes @@ -29,6 +29,8 @@ * The rbd CLI's "lock list" JSON and XML output has changed. + * The rbd CLI's "showmapped" JSON and XML output has changed. + * The sample ``crush-location-hook`` script has been removed. Its output is equivalent to the built-in default behavior, so it has been replaced with an example in the CRUSH documentation. diff --git a/qa/tasks/rbd_fio.py b/qa/tasks/rbd_fio.py index 663e8f524b4..bbd6ce0c6e9 100644 --- a/qa/tasks/rbd_fio.py +++ b/qa/tasks/rbd_fio.py @@ -218,7 +218,7 @@ def run_fio(remote, config, rbd_test_dir): mapped_images = json.loads(out.getvalue()) if mapped_images: log.info("Unmapping rbd images on {sn}".format(sn=sn)) - for image in mapped_images.itervalues(): + for image in mapped_images: remote.run(args=['sudo', 'rbd', 'unmap', str(image['device'])]) log.info("Cleaning up fio install") remote.run(args=['rm','-rf', run.Raw(rbd_test_dir)]) diff --git a/src/krbd.cc b/src/krbd.cc index 45f41e2d96b..cdc45e7dddc 100644 --- a/src/krbd.cc +++ b/src/krbd.cc @@ -639,7 +639,8 @@ static bool dump_one_image(Formatter *f, TextTable *tbl, return false; if (f) { - f->open_object_section(id); + f->open_object_section("device"); + f->dump_string("id", id); f->dump_string("pool", pool); f->dump_string("name", image); f->dump_string("snap", snap); @@ -693,7 +694,7 @@ int dump_images(struct krbd_ctx *ctx, Formatter *f) int r; if (f) { - f->open_object_section("devices"); + f->open_array_section("devices"); } else { tbl.define_column("id", TextTable::LEFT, TextTable::LEFT); tbl.define_column("pool", TextTable::LEFT, TextTable::LEFT);