From 7e2a7a8685235ffe409c4f7df1e60d39597b6f08 Mon Sep 17 00:00:00 2001 From: Loic Dachary Date: Sun, 31 May 2015 15:18:35 +0200 Subject: [PATCH] tests: cephtool/test.sh wait_for_clean after PG (re)mapping A get/set command may fail with Error EBUSY: currently creating pgs, wait if issued before the PGs are clean. Call wait_for_clean after the pool is created or a pool setting is changed and remaps the PGs it contains (size, pg_num...) to ensure the PGs are clean and the set/get command that follow will succeed. http://tracker.ceph.com/issues/11624 Fixes: #11624 Signed-off-by: Loic Dachary --- qa/workunits/cephtool/test.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/qa/workunits/cephtool/test.sh b/qa/workunits/cephtool/test.sh index b11a217dc828..fe23b69eccea 100755 --- a/qa/workunits/cephtool/test.sh +++ b/qa/workunits/cephtool/test.sh @@ -1256,6 +1256,7 @@ function test_mon_osd_pool_set() { TEST_POOL_GETSET=pool_getset ceph osd pool create $TEST_POOL_GETSET 1 + wait_for_clean ceph osd pool get $TEST_POOL_GETSET all for s in pg_num pgp_num size min_size crash_replay_interval crush_ruleset; do @@ -1269,6 +1270,7 @@ function test_mon_osd_pool_set() ceph osd pool set $TEST_POOL_GETSET size $old_size ceph osd pool create pool_erasure 1 1 erasure + wait_for_clean set +e ceph osd pool set pool_erasure size 4444 2>$TMPFILE check_response 'not change the size' @@ -1295,6 +1297,7 @@ function test_mon_osd_pool_set() expect_false ceph osd pool set $TEST_POOL_GETSET pgp_num 10 ceph osd pool set $TEST_POOL_GETSET nopgchange 0 ceph osd pool set $TEST_POOL_GETSET pg_num 10 + wait_for_clean ceph osd pool set $TEST_POOL_GETSET pgp_num 10 ceph osd pool set $TEST_POOL_GETSET nosizechange 1 @@ -1302,6 +1305,7 @@ function test_mon_osd_pool_set() expect_false ceph osd pool set $TEST_POOL_GETSET min_size 2 ceph osd pool set $TEST_POOL_GETSET nosizechange 0 ceph osd pool set $TEST_POOL_GETSET size 2 + wait_for_clean ceph osd pool set $TEST_POOL_GETSET min_size 2 ceph osd pool set $TEST_POOL_GETSET nodelete 1 @@ -1359,6 +1363,7 @@ function test_mon_osd_tiered_pool_set() # this is not a tier pool ceph osd pool create fake-tier 2 + wait_for_clean expect_false ceph osd pool set fake-tier hit_set_type explicit_hash expect_false ceph osd pool get fake-tier hit_set_type -- 2.47.3