]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
tests: cephtool/test.sh wait_for_clean after PG (re)mapping 4816/head
authorLoic Dachary <ldachary@redhat.com>
Sun, 31 May 2015 13:18:35 +0000 (15:18 +0200)
committerLoic Dachary <ldachary@redhat.com>
Sun, 31 May 2015 23:13:44 +0000 (01:13 +0200)
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 <ldachary@redhat.com>
qa/workunits/cephtool/test.sh

index b11a217dc828046cb9bc131d5ebec61abdf7878e..fe23b69ecceae4dbadb88a888eefab41c4e16234 100755 (executable)
@@ -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