From d28057a48758823a1b36084384d86172b5aef7b5 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sun, 17 Nov 2019 00:28:40 +0800 Subject: [PATCH] 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 --- qa/workunits/cephtool/test.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/qa/workunits/cephtool/test.sh b/qa/workunits/cephtool/test.sh index 150bd9173d378..f8a0d7efeeb49 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 -- 2.39.5