From: Sage Weil Date: Mon, 21 Apr 2014 21:18:21 +0000 (-0700) Subject: qa/workunits/cephtool/test.sh: make set pg_num test non-racy X-Git-Tag: v0.80-rc1~14 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2cb0bac6978267a6cd475021980ec25baa8b2cc3;p=ceph.git qa/workunits/cephtool/test.sh: make set pg_num test non-racy Loop while the pool is creating. Signed-off-by: Sage Weil Reviewed-by: Greg Farnum --- diff --git a/qa/workunits/cephtool/test.sh b/qa/workunits/cephtool/test.sh index b893dfedde9e..993798cd45c2 100755 --- a/qa/workunits/cephtool/test.sh +++ b/qa/workunits/cephtool/test.sh @@ -60,10 +60,15 @@ ceph osd tier add data cache2 expect_false ceph osd tier add metadata cache ceph osd tier cache-mode cache writeback ceph osd tier cache-mode cache readonly -expect_false ceph osd pool set cache pg_num 3 -set +e -ceph osd pool set cache pg_num 3 --yes-i-really-mean-it 2>$TMPFILE ; check_response 'currently creating pgs' $? 16 -set -e +TRIES=0 +while ! ceph osd pool set cache pg_num 3 --yes-i-really-mean-it 2>$TMPFILE +do + grep 'currently creating pgs' $TMPFILE + TRIES=$(( $TRIES + 1 )) + test $TRIES -ne 60 + sleep 3 +done +expect_false ceph osd pool set cache pg_num 4 ceph osd tier cache-mode cache none ceph osd tier set-overlay data cache expect_false ceph osd tier set-overlay data cache2