function test_mon_osd_tiered_pool_set()
{
- ceph osd pool set rbd hit_set_type explicit_hash
- ceph osd pool get rbd hit_set_type | grep "hit_set_type: explicit_hash"
- ceph osd pool set rbd hit_set_type explicit_object
- ceph osd pool get rbd hit_set_type | grep "hit_set_type: explicit_object"
- ceph osd pool set rbd hit_set_type bloom
- ceph osd pool get rbd hit_set_type | grep "hit_set_type: bloom"
- expect_false ceph osd pool set rbd hit_set_type i_dont_exist
- ceph osd pool set rbd hit_set_period 123
- ceph osd pool get rbd hit_set_period | grep "hit_set_period: 123"
- ceph osd pool set rbd hit_set_count 12
- ceph osd pool get rbd hit_set_count | grep "hit_set_count: 12"
- ceph osd pool set rbd hit_set_fpp .01
- ceph osd pool get rbd hit_set_fpp | grep "hit_set_fpp: 0.01"
-
- ceph osd pool set rbd target_max_objects 123
- ceph osd pool get rbd target_max_objects | \
+ # this is really a tier pool
+ ceph osd pool create real-tier 2
+ ceph osd tier add rbd real-tier
+
+ ceph osd pool set real-tier hit_set_type explicit_hash
+ ceph osd pool get real-tier hit_set_type | grep "hit_set_type: explicit_hash"
+ ceph osd pool set real-tier hit_set_type explicit_object
+ ceph osd pool get real-tier hit_set_type | grep "hit_set_type: explicit_object"
+ ceph osd pool set real-tier hit_set_type bloom
+ ceph osd pool get real-tier hit_set_type | grep "hit_set_type: bloom"
+ expect_false ceph osd pool set real-tier hit_set_type i_dont_exist
+ ceph osd pool set real-tier hit_set_period 123
+ ceph osd pool get real-tier hit_set_period | grep "hit_set_period: 123"
+ ceph osd pool set real-tier hit_set_count 12
+ ceph osd pool get real-tier hit_set_count | grep "hit_set_count: 12"
+ ceph osd pool set real-tier hit_set_fpp .01
+ ceph osd pool get real-tier hit_set_fpp | grep "hit_set_fpp: 0.01"
+
+ ceph osd pool set real-tier target_max_objects 123
+ ceph osd pool get real-tier target_max_objects | \
grep 'target_max_objects:[ \t]\+123'
- ceph osd pool set rbd target_max_bytes 123456
- ceph osd pool get rbd target_max_bytes | \
+ ceph osd pool set real-tier target_max_bytes 123456
+ ceph osd pool get real-tier target_max_bytes | \
grep 'target_max_bytes:[ \t]\+123456'
- ceph osd pool set rbd cache_target_dirty_ratio .123
- ceph osd pool get rbd cache_target_dirty_ratio | \
+ ceph osd pool set real-tier cache_target_dirty_ratio .123
+ ceph osd pool get real-tier cache_target_dirty_ratio | \
grep 'cache_target_dirty_ratio:[ \t]\+0.123'
- expect_false ceph osd pool set rbd cache_target_dirty_ratio -.2
- expect_false ceph osd pool set rbd cache_target_dirty_ratio 1.1
- ceph osd pool set rbd cache_target_full_ratio .123
- ceph osd pool get rbd cache_target_full_ratio | \
+ expect_false ceph osd pool set real-tier cache_target_dirty_ratio -.2
+ expect_false ceph osd pool set real-tier cache_target_dirty_ratio 1.1
+ ceph osd pool set real-tier cache_target_full_ratio .123
+ ceph osd pool get real-tier cache_target_full_ratio | \
grep 'cache_target_full_ratio:[ \t]\+0.123'
ceph osd dump -f json-pretty | grep '"cache_target_full_ratio_micro": 123000'
- ceph osd pool set rbd cache_target_full_ratio 1.0
- ceph osd pool set rbd cache_target_full_ratio 0
- expect_false ceph osd pool set rbd cache_target_full_ratio 1.1
- ceph osd pool set rbd cache_min_flush_age 123
- ceph osd pool get rbd cache_min_flush_age | \
+ ceph osd pool set real-tier cache_target_full_ratio 1.0
+ ceph osd pool set real-tier cache_target_full_ratio 0
+ expect_false ceph osd pool set real-tier cache_target_full_ratio 1.1
+ ceph osd pool set real-tier cache_min_flush_age 123
+ ceph osd pool get real-tier cache_min_flush_age | \
grep 'cache_min_flush_age:[ \t]\+123'
- ceph osd pool set rbd cache_min_evict_age 234
- ceph osd pool get rbd cache_min_evict_age | \
+ ceph osd pool set real-tier cache_min_evict_age 234
+ ceph osd pool get real-tier cache_min_evict_age | \
grep 'cache_min_evict_age:[ \t]\+234'
+ # this is not a tier pool
+ ceph osd pool create fake-tier 2
+
+ expect_false ceph osd pool set fake-tier hit_set_type explicit_hash
+ expect_false ceph osd pool get fake-tier hit_set_type
+ expect_false ceph osd pool set fake-tier hit_set_type explicit_object
+ expect_false ceph osd pool get fake-tier hit_set_type
+ expect_false ceph osd pool set fake-tier hit_set_type bloom
+ expect_false ceph osd pool get fake-tier hit_set_type
+ expect_false ceph osd pool set fake-tier hit_set_type i_dont_exist
+ expect_false ceph osd pool set fake-tier hit_set_period 123
+ expect_false ceph osd pool get fake-tier hit_set_period
+ expect_false ceph osd pool set fake-tier hit_set_count 12
+ expect_false ceph osd pool get fake-tier hit_set_count
+ expect_false ceph osd pool set fake-tier hit_set_fpp .01
+ expect_false ceph osd pool get fake-tier hit_set_fpp
+
+ expect_false ceph osd pool set fake-tier target_max_objects 123
+ expect_false ceph osd pool get fake-tier target_max_objects
+ expect_false ceph osd pool set fake-tier target_max_bytes 123456
+ expect_false ceph osd pool get fake-tier target_max_bytes
+ expect_false ceph osd pool set fake-tier cache_target_dirty_ratio .123
+ expect_false ceph osd pool get fake-tier cache_target_dirty_ratio
+ expect_false expect_false ceph osd pool set fake-tier cache_target_dirty_ratio -.2
+ expect_false expect_false ceph osd pool set fake-tier cache_target_dirty_ratio 1.1
+ expect_false ceph osd pool set fake-tier cache_target_full_ratio .123
+ expect_false ceph osd pool get fake-tier cache_target_full_ratio
+ expect_false ceph osd dump -f json-pretty
+ expect_false ceph osd pool set fake-tier cache_target_full_ratio 1.0
+ expect_false ceph osd pool set fake-tier cache_target_full_ratio 0
+ expect_false expect_false ceph osd pool set fake-tier cache_target_full_ratio 1.1
+ expect_false ceph osd pool set fake-tier cache_min_flush_age 123
+ expect_false ceph osd pool get fake-tier cache_min_flush_age
+ expect_false ceph osd pool set fake-tier cache_min_evict_age 234
+ expect_false ceph osd pool get fake-tier cache_min_evict_age
+
+ ceph osd tier remove rbd real-tier
+ ceph osd pool delete real-tier real-tier --yes-i-really-really-mean-it
+ ceph osd pool delete fake-tier fake-tier --yes-i-really-really-mean-it
}
function test_mon_osd_erasure_code()
mon_osd_pool_quota
mon_pg
mon_osd_pool_set
+ mon_osd_tiered_pool_set
mon_osd_erasure_code
mon_osd_misc
mon_heap_profiler