]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/workunits/cephtool/test.sh: fix iec/si tests
authorKefu Chai <kchai@redhat.com>
Sat, 16 Nov 2019 16:28:40 +0000 (00:28 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 18 Nov 2019 05:51:19 +0000 (13:51 +0800)
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 <kchai@redhat.com>
qa/workunits/cephtool/test.sh

index 150bd9173d37882d8e6ab1b420da1c80b2d3a8cf..f8a0d7efeeb4953a46c7a4beae8c8a33fee487d4 100755 (executable)
@@ -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