diff --git a/qa/workunits/cephtool/test.sh b/qa/workunits/cephtool/test.sh index df8af043e17..a612eb4d73d 100755 --- a/qa/workunits/cephtool/test.sh +++ b/qa/workunits/cephtool/test.sh @@ -1962,12 +1962,12 @@ function test_mon_osd_pool_set() ceph osd pool set $TEST_POOL_GETSET pgp_num 10 old_pgs=$(ceph osd pool get $TEST_POOL_GETSET pg_num | sed -e 's/pg_num: //') - new_pgs=$(($old_pgs+$(ceph osd stat | grep osdmap | awk '{print $3})*32)) + new_pgs=$(($old_pgs + $(ceph osd stat --format json | jq '.num_osds') * 32)) ceph osd pool set $TEST_POOL_GETSET pg_num $new_pgs ceph osd pool set $TEST_POOL_GETSET pgp_num $new_pgs wait_for_clean old_pgs=$(ceph osd pool get $TEST_POOL_GETSET pg_num | sed -e 's/pg_num: //') - new_pgs=$(($old_pgs+$(ceph osd stat | grep osdmap | awk '{print $3})*32+1)) + new_pgs=$(($old_pgs + $(ceph osd stat --format json | jq '.num_osds') * 32 + 1)) expect_false ceph osd pool set $TEST_POOL_GETSET pg_num $new_pgs ceph osd pool set $TEST_POOL_GETSET nosizechange 1