From 82a01d3d3b0aaac225f467b76dca2cb3c935a6ae Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Thu, 16 Jan 2020 09:53:03 -0500 Subject: [PATCH 1/3] qa/tasks: use correct NFS service name for EL8 distros Signed-off-by: Jason Dillaman --- qa/tasks/qemu.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/qa/tasks/qemu.py b/qa/tasks/qemu.py index 54bf09f2c40..0b77ff5d310 100644 --- a/qa/tasks/qemu.py +++ b/qa/tasks/qemu.py @@ -266,7 +266,7 @@ def download_image(ctx, config): ) -def _setup_nfs_mount(remote, client, mount_dir): +def _setup_nfs_mount(remote, client, service_name, mount_dir): """ Sets up an nfs mount on the remote that the guest can use to store logs. This nfs mount is also used to touch a file @@ -297,10 +297,10 @@ def _setup_nfs_mount(remote, client, mount_dir): if remote.os.package_type == "deb": remote.run(args=['sudo', 'service', 'nfs-kernel-server', 'restart']) else: - remote.run(args=['sudo', 'systemctl', 'restart', 'nfs']) + remote.run(args=['sudo', 'systemctl', 'restart', service_name]) -def _teardown_nfs_mount(remote, client): +def _teardown_nfs_mount(remote, client, service_name): """ Tears down the nfs mount on the remote used for logging and reporting the status of the tests being ran in the guest. @@ -314,7 +314,7 @@ def _teardown_nfs_mount(remote, client): ]) else: remote.run(args=[ - 'sudo', 'systemctl', 'stop', 'nfs' + 'sudo', 'systemctl', 'stop', service_name ]) log.info("Unmounting exported directory...") remote.run(args=[ @@ -335,7 +335,7 @@ def _teardown_nfs_mount(remote, client): ]) else: remote.run(args=[ - 'sudo', 'systemctl', 'start', 'nfs' + 'sudo', 'systemctl', 'start', service_name ]) @@ -354,9 +354,13 @@ def run_qemu(ctx, config): ] ) + nfs_service_name = 'nfs' + if remote.os.name in ['rhel', 'centos'] and float(remote.os.version) >= 8: + nfs_service_name = 'nfs-server' + # make an nfs mount to use for logging and to # allow to test to tell teuthology the tests outcome - _setup_nfs_mount(remote, client, log_dir) + _setup_nfs_mount(remote, client, nfs_service_name, log_dir) # Hack to make sure /dev/kvm permissions are set correctly # See http://tracker.ceph.com/issues/17977 and @@ -443,7 +447,7 @@ def run_qemu(ctx, config): ) # teardown nfs mount - _teardown_nfs_mount(remote, client) + _teardown_nfs_mount(remote, client, nfs_service_name) # check for test status remote.run( args=[ From cefaa78186f5d1311831a67ac340992400cca475 Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Thu, 16 Jan 2020 11:39:32 -0500 Subject: [PATCH 2/3] qa/workunits/rbd: use more recent qemu-iotests that support EL8 Signed-off-by: Jason Dillaman --- qa/workunits/rbd/qemu-iotests.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qa/workunits/rbd/qemu-iotests.sh b/qa/workunits/rbd/qemu-iotests.sh index 1cd9c4e00c0..ddb63dae3b5 100755 --- a/qa/workunits/rbd/qemu-iotests.sh +++ b/qa/workunits/rbd/qemu-iotests.sh @@ -12,7 +12,7 @@ cd qemu if lsb_release -da 2>&1 | grep -iq 'bionic'; then # Bionic requires a matching test harness git checkout v2.11.0 -elif lsb_release -da 2>&1 | grep -iq 'xenial'; then +elif lsb_release -da 2>&1 | grep -iqE '(xenial|linux release 8)'; then # Xenial requires a recent test harness git checkout v2.3.0 else @@ -36,7 +36,8 @@ else QEMU='/usr/libexec/qemu-kvm' # disable test 055 since qemu-kvm (RHEL/CentOS) doesn't support the - # required QMP commands + # required QMP commands under EL7 and Python 3 is not supported by + # the test under EL8 testlist=$(echo ${testlist} | sed "s/ 055//g") fi ln -s $QEMU bin/qemu From 2ec6317c7c490ea98011dcd4d8345eaf23891aed Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Thu, 16 Jan 2020 12:18:04 -0500 Subject: [PATCH 3/3] test/cli-integration/rbd: fixed EL8 json and xml incompatibilities Python 3 doesn't sort keys by default and xml_pp is not available under EL8. Signed-off-by: Jason Dillaman --- .../cli-integration/rbd/formatted-output.t | 148 +++++++++--------- src/test/cli-integration/rbd/snap-diff.t | 2 +- 2 files changed, 74 insertions(+), 76 deletions(-) diff --git a/src/test/cli-integration/rbd/formatted-output.t b/src/test/cli-integration/rbd/formatted-output.t index 9eba5d49e00..04c6ebdb31e 100644 --- a/src/test/cli-integration/rbd/formatted-output.t +++ b/src/test/cli-integration/rbd/formatted-output.t @@ -61,7 +61,7 @@ For now, use a more inclusive regex. \tsnapshot_count: 1 (esc) [^^]+ (re) \tformat: 1 (esc) - $ rbd info foo --format json | python3 -mjson.tool | sed 's/,$/, /' + $ rbd info foo --format json | python3 -mjson.tool --sort-keys | sed 's/,$/, /' { "block_name_prefix": "rb.0.*", (glob) "format": 1, @@ -73,12 +73,10 @@ For now, use a more inclusive regex. "size": 1073741824, "snapshot_count": 1 } -The version of xml_pp included in ubuntu precise always prints a 'warning' -whenever it is run. grep -v to ignore it, but still work on other distros. - $ rbd info foo --format xml | xml_pp 2>&1 | grep -v '^new version at /usr/bin/xml_pp' + $ rbd info foo --format xml | xmlstarlet format -s 2 -o || true foo - + 1073741824 256 22 @@ -95,7 +93,7 @@ whenever it is run. grep -v to ignore it, but still work on other distros. [^^]+ (re) \tformat: 1 (esc) \tprotected: False (esc) - $ rbd info foo@snap --format json | python3 -mjson.tool | sed 's/,$/, /' + $ rbd info foo@snap --format json | python3 -mjson.tool --sort-keys | sed 's/,$/, /' { "block_name_prefix": "rb.0.*", (glob) "format": 1, @@ -108,10 +106,10 @@ whenever it is run. grep -v to ignore it, but still work on other distros. "size": 1073741824, "snapshot_count": 1 } - $ rbd info foo@snap --format xml | xml_pp 2>&1 | grep -v '^new version at /usr/bin/xml_pp' + $ rbd info foo@snap --format xml | xmlstarlet format -s 2 -o || true foo - + 1073741824 256 22 @@ -135,7 +133,7 @@ whenever it is run. grep -v to ignore it, but still work on other distros. \tcreate_timestamp:* (glob) \taccess_timestamp:* (glob) \tmodify_timestamp:* (glob) - $ rbd info bar --format json | python3 -mjson.tool | sed 's/,$/, /' + $ rbd info bar --format json | python3 -mjson.tool --sort-keys | sed 's/,$/, /' { "access_timestamp": "*", (glob) "block_name_prefix": "rbd_data.*", (glob) @@ -159,7 +157,7 @@ whenever it is run. grep -v to ignore it, but still work on other distros. "size": 1073741824, "snapshot_count": 2 } - $ rbd info bar --format xml | xml_pp 2>&1 | grep -v '^new version at /usr/bin/xml_pp' + $ rbd info bar --format xml | xmlstarlet format -s 2 -o || true bar * (glob) @@ -177,8 +175,8 @@ whenever it is run. grep -v to ignore it, but still work on other distros. fast-diff deep-flatten - - + + * (glob) * (glob) * (glob) @@ -198,7 +196,7 @@ whenever it is run. grep -v to ignore it, but still work on other distros. \taccess_timestamp:* (glob) \tmodify_timestamp:* (glob) \tprotected: True (esc) - $ rbd info bar@snap --format json | python3 -mjson.tool | sed 's/,$/, /' + $ rbd info bar@snap --format json | python3 -mjson.tool --sort-keys | sed 's/,$/, /' { "access_timestamp": "*", (glob) "block_name_prefix": "rbd_data.*", (glob) @@ -223,7 +221,7 @@ whenever it is run. grep -v to ignore it, but still work on other distros. "size": 536870912, "snapshot_count": 2 } - $ rbd info bar@snap --format xml | xml_pp 2>&1 | grep -v '^new version at /usr/bin/xml_pp' + $ rbd info bar@snap --format xml | xmlstarlet format -s 2 -o || true bar * (glob) @@ -241,8 +239,8 @@ whenever it is run. grep -v to ignore it, but still work on other distros. fast-diff deep-flatten - - + + * (glob) * (glob) * (glob) @@ -263,7 +261,7 @@ whenever it is run. grep -v to ignore it, but still work on other distros. \taccess_timestamp:* (glob) \tmodify_timestamp:* (glob) \tprotected: False (esc) - $ rbd info bar@snap2 --format json | python3 -mjson.tool | sed 's/,$/, /' + $ rbd info bar@snap2 --format json | python3 -mjson.tool --sort-keys | sed 's/,$/, /' { "access_timestamp": "*", (glob) "block_name_prefix": "rbd_data.*", (glob) @@ -288,7 +286,7 @@ whenever it is run. grep -v to ignore it, but still work on other distros. "size": 1073741824, "snapshot_count": 2 } - $ rbd info bar@snap2 --format xml | xml_pp 2>&1 | grep -v '^new version at /usr/bin/xml_pp' + $ rbd info bar@snap2 --format xml | xmlstarlet format -s 2 -o || true bar * (glob) @@ -306,8 +304,8 @@ whenever it is run. grep -v to ignore it, but still work on other distros. fast-diff deep-flatten - - + + * (glob) * (glob) * (glob) @@ -327,7 +325,7 @@ whenever it is run. grep -v to ignore it, but still work on other distros. \tcreate_timestamp:* (glob) \taccess_timestamp:* (glob) \tmodify_timestamp:* (glob) - $ rbd info baz --format json | python3 -mjson.tool | sed 's/,$/, /' + $ rbd info baz --format json | python3 -mjson.tool --sort-keys | sed 's/,$/, /' { "access_timestamp": "*", (glob) "block_name_prefix": "rbd_data.*", (glob) @@ -347,7 +345,7 @@ whenever it is run. grep -v to ignore it, but still work on other distros. "size": 2147483648, "snapshot_count": 0 } - $ rbd info baz --format xml | xml_pp 2>&1 | grep -v '^new version at /usr/bin/xml_pp' + $ rbd info baz --format xml | xmlstarlet format -s 2 -o || true baz * (glob) @@ -361,8 +359,8 @@ whenever it is run. grep -v to ignore it, but still work on other distros. layering - - + + * (glob) * (glob) * (glob) @@ -374,7 +372,7 @@ whenever it is run. grep -v to ignore it, but still work on other distros. \tsnapshot_count: 0 (esc) [^^]+ (re) \tformat: 1 (esc) - $ rbd info quux --format json | python3 -mjson.tool | sed 's/,$/, /' + $ rbd info quux --format json | python3 -mjson.tool --sort-keys | sed 's/,$/, /' { "block_name_prefix": "rb.0.*", (glob) "format": 1, @@ -386,10 +384,10 @@ whenever it is run. grep -v to ignore it, but still work on other distros. "size": 1048576, "snapshot_count": 0 } - $ rbd info quux --format xml | xml_pp 2>&1 | grep -v '^new version at /usr/bin/xml_pp' + $ rbd info quux --format xml | xmlstarlet format -s 2 -o || true quux - + 1048576 1 22 @@ -412,7 +410,7 @@ whenever it is run. grep -v to ignore it, but still work on other distros. \tcreate_timestamp:* (glob) \taccess_timestamp:* (glob) \tmodify_timestamp:* (glob) - $ rbd info rbd_other/child --format json | python3 -mjson.tool | sed 's/,$/, /' + $ rbd info rbd_other/child --format json | python3 -mjson.tool --sort-keys | sed 's/,$/, /' { "access_timestamp": "*", (glob) "block_name_prefix": "rbd_data.*", (glob) @@ -435,7 +433,7 @@ whenever it is run. grep -v to ignore it, but still work on other distros. "size": 536870912, "snapshot_count": 1 } - $ rbd info rbd_other/child --format xml | xml_pp 2>&1 | grep -v '^new version at /usr/bin/xml_pp' + $ rbd info rbd_other/child --format xml | xmlstarlet format -s 2 -o || true child * (glob) @@ -452,8 +450,8 @@ whenever it is run. grep -v to ignore it, but still work on other distros. object-map fast-diff - - + + * (glob) * (glob) * (glob) @@ -475,7 +473,7 @@ whenever it is run. grep -v to ignore it, but still work on other distros. \tprotected: False (esc) \tparent: rbd/bar@snap (esc) \toverlap: 512 MiB (esc) - $ rbd info rbd_other/child@snap --format json | python3 -mjson.tool | sed 's/,$/, /' + $ rbd info rbd_other/child@snap --format json | python3 -mjson.tool --sort-keys | sed 's/,$/, /' { "access_timestamp": "*", (glob) "block_name_prefix": "rbd_data.*", (glob) @@ -508,7 +506,7 @@ whenever it is run. grep -v to ignore it, but still work on other distros. "size": 536870912, "snapshot_count": 1 } - $ rbd info rbd_other/child@snap --format xml | xml_pp 2>&1 | grep -v '^new version at /usr/bin/xml_pp' + $ rbd info rbd_other/child@snap --format xml | xmlstarlet format -s 2 -o || true child * (glob) @@ -525,15 +523,15 @@ whenever it is run. grep -v to ignore it, but still work on other distros. object-map fast-diff - - + + * (glob) * (glob) * (glob) false rbd - + bar * (glob) snap @@ -555,7 +553,7 @@ whenever it is run. grep -v to ignore it, but still work on other distros. \tcreate_timestamp:* (glob) \taccess_timestamp:* (glob) \tmodify_timestamp:* (glob) - $ rbd info rbd_other/deep-flatten-child --format json | python3 -mjson.tool | sed 's/,$/, /' + $ rbd info rbd_other/deep-flatten-child --format json | python3 -mjson.tool --sort-keys | sed 's/,$/, /' { "access_timestamp": "*", (glob) "block_name_prefix": "rbd_data.*", (glob) @@ -579,7 +577,7 @@ whenever it is run. grep -v to ignore it, but still work on other distros. "size": 536870912, "snapshot_count": 1 } - $ rbd info rbd_other/deep-flatten-child --format xml | xml_pp 2>&1 | grep -v '^new version at /usr/bin/xml_pp' + $ rbd info rbd_other/deep-flatten-child --format xml | xmlstarlet format -s 2 -o || true deep-flatten-child * (glob) @@ -597,8 +595,8 @@ whenever it is run. grep -v to ignore it, but still work on other distros. fast-diff deep-flatten - - + + * (glob) * (glob) * (glob) @@ -618,7 +616,7 @@ whenever it is run. grep -v to ignore it, but still work on other distros. \taccess_timestamp:* (glob) \tmodify_timestamp:* (glob) \tprotected: False (esc) - $ rbd info rbd_other/deep-flatten-child@snap --format json | python3 -mjson.tool | sed 's/,$/, /' + $ rbd info rbd_other/deep-flatten-child@snap --format json | python3 -mjson.tool --sort-keys | sed 's/,$/, /' { "access_timestamp": "*", (glob) "block_name_prefix": "rbd_data.*", (glob) @@ -643,7 +641,7 @@ whenever it is run. grep -v to ignore it, but still work on other distros. "size": 536870912, "snapshot_count": 1 } - $ rbd info rbd_other/deep-flatten-child@snap --format xml | xml_pp 2>&1 | grep -v '^new version at /usr/bin/xml_pp' + $ rbd info rbd_other/deep-flatten-child@snap --format xml | xmlstarlet format -s 2 -o || true deep-flatten-child * (glob) @@ -661,8 +659,8 @@ whenever it is run. grep -v to ignore it, but still work on other distros. fast-diff deep-flatten - - + + * (glob) * (glob) * (glob) @@ -674,7 +672,7 @@ whenever it is run. grep -v to ignore it, but still work on other distros. bar baz quuy - $ rbd list --format json | python3 -mjson.tool | sed 's/,$/, /' + $ rbd list --format json | python3 -mjson.tool --sort-keys | sed 's/,$/, /' [ "foo", "quux", @@ -682,7 +680,7 @@ whenever it is run. grep -v to ignore it, but still work on other distros. "baz", "quuy" ] - $ rbd list --format xml | xml_pp 2>&1 | grep -v '^new version at /usr/bin/xml_pp' + $ rbd list --format xml | xmlstarlet format -s 2 -o || true foo quux @@ -700,7 +698,7 @@ whenever it is run. grep -v to ignore it, but still work on other distros. bar@snap2 1 GiB 2 baz 2 GiB 2 shr quuy 2 GiB 2 - $ rbd list -l --format json | python3 -mjson.tool | sed 's/,$/, /' + $ rbd list -l --format json | python3 -mjson.tool --sort-keys | sed 's/,$/, /' [ { "format": 1, @@ -762,17 +760,17 @@ whenever it is run. grep -v to ignore it, but still work on other distros. "size": 2147483648 } ] - $ rbd list -l --format xml | xml_pp 2>&1 | grep -v '^new version at /usr/bin/xml_pp' + $ rbd list -l --format xml | xmlstarlet format -s 2 -o || true foo - + 1073741824 1 foo - + snap * (glob) 1073741824 @@ -781,7 +779,7 @@ whenever it is run. grep -v to ignore it, but still work on other distros. quux - + 1048576 1 exclusive @@ -827,12 +825,12 @@ whenever it is run. grep -v to ignore it, but still work on other distros. $ rbd list rbd_other child deep-flatten-child - $ rbd list rbd_other --format json | python3 -mjson.tool | sed 's/,$/, /' + $ rbd list rbd_other --format json | python3 -mjson.tool --sort-keys | sed 's/,$/, /' [ "child", "deep-flatten-child" ] - $ rbd list rbd_other --format xml | xml_pp 2>&1 | grep -v '^new version at /usr/bin/xml_pp' + $ rbd list rbd_other --format xml | xmlstarlet format -s 2 -o || true child deep-flatten-child @@ -843,7 +841,7 @@ whenever it is run. grep -v to ignore it, but still work on other distros. child@snap 512 MiB rbd/bar@snap 2 deep-flatten-child 512 MiB 2 deep-flatten-child@snap 512 MiB 2 - $ rbd list rbd_other -l --format json | python3 -mjson.tool | sed 's/,$/, /' + $ rbd list rbd_other -l --format json | python3 -mjson.tool --sort-keys | sed 's/,$/, /' [ { "format": 2, @@ -882,7 +880,7 @@ whenever it is run. grep -v to ignore it, but still work on other distros. "snapshot_id": * (glob) } ] - $ rbd list rbd_other -l --format xml | xml_pp 2>&1 | grep -v '^new version at /usr/bin/xml_pp' + $ rbd list rbd_other -l --format xml | xmlstarlet format -s 2 -o || true child @@ -898,7 +896,7 @@ whenever it is run. grep -v to ignore it, but still work on other distros. 536870912 rbd - + bar snap @@ -922,15 +920,15 @@ whenever it is run. grep -v to ignore it, but still work on other distros. $ rbd lock list foo - $ rbd lock list foo --format json | python3 -mjson.tool | sed 's/,$/, /' + $ rbd lock list foo --format json | python3 -mjson.tool --sort-keys | sed 's/,$/, /' [] - $ rbd lock list foo --format xml | xml_pp 2>&1 | grep -v '^new version at /usr/bin/xml_pp' - + $ rbd lock list foo --format xml | xmlstarlet format -s 2 -o || true + $ rbd lock list quux There is 1 exclusive lock on this image. Locker*ID*Address* (glob) client.* id * (glob) - $ rbd lock list quux --format json | python3 -mjson.tool | sed 's/,$/, /' + $ rbd lock list quux --format json | python3 -mjson.tool --sort-keys | sed 's/,$/, /' [ { "address": "*", (glob) @@ -938,7 +936,7 @@ whenever it is run. grep -v to ignore it, but still work on other distros. "locker": "client.*" (glob) } ] - $ rbd lock list quux --format xml | xml_pp 2>&1 | grep -v '^new version at /usr/bin/xml_pp' + $ rbd lock list quux --format xml | xmlstarlet format -s 2 -o || true id @@ -953,7 +951,7 @@ whenever it is run. grep -v to ignore it, but still work on other distros. client.*id[123].* (re) client.*id[123].* (re) client.*id[123].* (re) - $ rbd lock list baz --format json | python3 -mjson.tool | sed 's/,$/, /' + $ rbd lock list baz --format json | python3 -mjson.tool --sort-keys | sed 's/,$/, /' [ { "address": "*", (glob) @@ -971,7 +969,7 @@ whenever it is run. grep -v to ignore it, but still work on other distros. "locker": "client.*" (glob) } ] - $ rbd lock list baz --format xml | xml_pp 2>&1 | grep -v '^new version at /usr/bin/xml_pp' + $ rbd lock list baz --format xml | xmlstarlet format -s 2 -o || true id* (glob) @@ -992,7 +990,7 @@ whenever it is run. grep -v to ignore it, but still work on other distros. $ rbd snap list foo SNAPID*NAME*SIZE*PROTECTED*TIMESTAMP* (glob) *snap*1 GiB* (glob) - $ rbd snap list foo --format json | python3 -mjson.tool | sed 's/,$/, /' + $ rbd snap list foo --format json | python3 -mjson.tool --sort-keys | sed 's/,$/, /' [ { "id": *, (glob) @@ -1002,21 +1000,21 @@ whenever it is run. grep -v to ignore it, but still work on other distros. "timestamp": "" } ] - $ rbd snap list foo --format xml | xml_pp 2>&1 | grep -v '^new version at /usr/bin/xml_pp' + $ rbd snap list foo --format xml | xmlstarlet format -s 2 -o || true * (glob) snap 1073741824 false - + $ rbd snap list bar SNAPID*NAME*SIZE*PROTECTED*TIMESTAMP* (glob) *snap*512 MiB*yes* (glob) *snap2*1 GiB* (glob) - $ rbd snap list bar --format json | python3 -mjson.tool | sed 's/,$/, /' + $ rbd snap list bar --format json | python3 -mjson.tool --sort-keys | sed 's/,$/, /' [ { "id": *, (glob) @@ -1033,7 +1031,7 @@ whenever it is run. grep -v to ignore it, but still work on other distros. "timestamp": * (glob) } ] - $ rbd snap list bar --format xml | xml_pp 2>&1 | grep -v '^new version at /usr/bin/xml_pp' + $ rbd snap list bar --format xml | xmlstarlet format -s 2 -o || true * (glob) @@ -1051,14 +1049,14 @@ whenever it is run. grep -v to ignore it, but still work on other distros. $ rbd snap list baz - $ rbd snap list baz --format json | python3 -mjson.tool | sed 's/,$/, /' + $ rbd snap list baz --format json | python3 -mjson.tool --sort-keys | sed 's/,$/, /' [] - $ rbd snap list baz --format xml | xml_pp 2>&1 | grep -v '^new version at /usr/bin/xml_pp' - + $ rbd snap list baz --format xml | xmlstarlet format -s 2 -o || true + $ rbd snap list rbd_other/child SNAPID*NAME*SIZE*PROTECTED*TIMESTAMP* (glob) *snap*512 MiB* (glob) - $ rbd snap list rbd_other/child --format json | python3 -mjson.tool | sed 's/,$/, /' + $ rbd snap list rbd_other/child --format json | python3 -mjson.tool --sort-keys | sed 's/,$/, /' [ { "id": *, (glob) @@ -1068,7 +1066,7 @@ whenever it is run. grep -v to ignore it, but still work on other distros. "timestamp": * (glob) } ] - $ rbd snap list rbd_other/child --format xml | xml_pp 2>&1 | grep -v '^new version at /usr/bin/xml_pp' + $ rbd snap list rbd_other/child --format xml | xmlstarlet format -s 2 -o || true * (glob) @@ -1085,7 +1083,7 @@ whenever it is run. grep -v to ignore it, but still work on other distros. deep-flatten-child@snap 512 MiB 0 B deep-flatten-child 512 MiB 0 B 1 GiB 4 MiB - $ rbd disk-usage --pool rbd_other --format json | python3 -mjson.tool | sed 's/,$/, /' + $ rbd disk-usage --pool rbd_other --format json | python3 -mjson.tool --sort-keys | sed 's/,$/, /' { "images": [ { @@ -1120,7 +1118,7 @@ whenever it is run. grep -v to ignore it, but still work on other distros. "total_provisioned_size": 1073741824, "total_used_size": 4194304 } - $ rbd disk-usage --pool rbd_other --format xml | xml_pp 2>&1 | grep -v '^new version at /usr/bin/xml_pp' + $ rbd disk-usage --pool rbd_other --format xml | xmlstarlet format -s 2 -o || true diff --git a/src/test/cli-integration/rbd/snap-diff.t b/src/test/cli-integration/rbd/snap-diff.t index 86d1671de2d..ba9c0d6fed6 100644 --- a/src/test/cli-integration/rbd/snap-diff.t +++ b/src/test/cli-integration/rbd/snap-diff.t @@ -19,7 +19,7 @@ $ rbd diff --from-snap=allzeroes xrbddiff1/xtestdiff1 --format json [{"offset":0,"length":1048576,"exists":"true"}] $ rbd snap create xrbddiff1/xtestdiff1 --snap=snap1 - $ rbd snap list xrbddiff1/xtestdiff1 --format json | python3 -mjson.tool | sed 's/,$/, /' + $ rbd snap list xrbddiff1/xtestdiff1 --format json | python3 -mjson.tool --sort-keys | sed 's/,$/, /' [ { "id": *, (glob)