From: Kefu Chai Date: Sat, 16 Nov 2019 16:28:40 +0000 (+0800) Subject: qa/workunits/cephtool/test.sh: fix iec/si tests X-Git-Tag: v15.1.0~866^2~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d28057a48758823a1b36084384d86172b5aef7b5;p=ceph.git qa/workunits/cephtool/test.sh: fix iec/si tests tests all IEC and SI units related test with a tier pool. as `target_max_objects` and `target_size_bytes` only apply to tier pools. so, for the sake of simplicity, tests all of them using a tier pool. introduced by 9095f67e Signed-off-by: Kefu Chai --- diff --git a/qa/workunits/cephtool/test.sh b/qa/workunits/cephtool/test.sh index 150bd9173d37..f8a0d7efeeb4 100755 --- a/qa/workunits/cephtool/test.sh +++ b/qa/workunits/cephtool/test.sh @@ -2275,18 +2275,6 @@ function test_mon_osd_pool_set() ceph osd pool get rbd crush_rule | grep 'crush_rule: ' - # iec vs si units - ceph osd pool set $TEST_POOLGETSET target_max_objects 1K - ceph osd pool get $TEST_POOLGETSET target_max_objects | grep 1000 - for o in target_max_bytes target_size_bytes compression_max_blob_size compression_min_blob_size csum_max_block csum_min_block; do - ceph osd pool set $TEST_POOLGETSET $o 1Ki # no i suffix - val=$(ceph osd pool get $TEST_POOLGETSET $o --format=json | jq -c ".$o") - [[ $val == 1024 ]] - ceph osd pool set $TEST_POOLGETSET $o 1M # with i suffix - val=$(ceph osd pool get $TEST_POOLGETSET $o --format=json | jq -c ".$o") - [[ $val == 1048576 ]] - done - ceph osd pool get $TEST_POOL_GETSET compression_mode | expect_false grep '.' ceph osd pool set $TEST_POOL_GETSET compression_mode aggressive ceph osd pool get $TEST_POOL_GETSET compression_mode | grep 'aggressive' @@ -2386,6 +2374,18 @@ function test_mon_osd_tiered_pool_set() ceph osd pool get real-tier cache_min_evict_age | \ grep 'cache_min_evict_age:[ \t]\+234' + # iec vs si units + ceph osd pool set real-tier target_max_objects 1K + ceph osd pool get real-tier target_max_objects | grep 1000 + for o in target_max_bytes target_size_bytes compression_max_blob_size compression_min_blob_size csum_max_block csum_min_block; do + ceph osd pool set real-tier $o 1Ki # no i suffix + val=$(ceph osd pool get real-tier $o --format=json | jq -c ".$o") + [[ $val == 1024 ]] + ceph osd pool set real-tier $o 1M # with i suffix + val=$(ceph osd pool get real-tier $o --format=json | jq -c ".$o") + [[ $val == 1048576 ]] + done + # this is not a tier pool ceph osd pool create fake-tier 2 ceph osd pool application enable fake-tier rados