From: Jason Dillaman Date: Mon, 17 Sep 2018 20:20:57 +0000 (-0400) Subject: qa/workunits/rbd: wait max 2 hrs for all stress images to sync X-Git-Tag: v14.0.1~169^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=dca9e3e2527755d727d36773db79e09c413c4f30;p=ceph.git qa/workunits/rbd: wait max 2 hrs for all stress images to sync Sporadically the rbd-mirror fsx stress test would fail due to very slow sync times due to overloaded clusters. Attempt to wait for all images to be replicated before proceeding with the comparison. Signed-off-by: Jason Dillaman --- diff --git a/qa/workunits/rbd/rbd_mirror_fsx_compare.sh b/qa/workunits/rbd/rbd_mirror_fsx_compare.sh index 21eba1205cbf..0ba3c97d7519 100755 --- a/qa/workunits/rbd/rbd_mirror_fsx_compare.sh +++ b/qa/workunits/rbd/rbd_mirror_fsx_compare.sh @@ -11,6 +11,16 @@ trap 'cleanup $?' INT TERM EXIT setup_tempdir +testlog "TEST: wait for all images" +image_count=$(rbd --cluster ${CLUSTER1} --pool ${POOL} ls | wc -l) +retrying_seconds=0 +sleep_seconds=10 +while [ ${retrying_seconds} -le 7200 ]; do + [ $(rbd --cluster ${CLUSTER2} --pool ${POOL} ls | wc -l) -ge ${image_count} ] && break + sleep ${sleep_seconds} + retrying_seconds=$(($retrying_seconds+${sleep_seconds})) +done + testlog "TEST: snapshot all pool images" snap_id=`uuidgen` for image in $(rbd --cluster ${CLUSTER1} --pool ${POOL} ls); do