From dca9e3e2527755d727d36773db79e09c413c4f30 Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Mon, 17 Sep 2018 16:20:57 -0400 Subject: [PATCH] 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 --- qa/workunits/rbd/rbd_mirror_fsx_compare.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/qa/workunits/rbd/rbd_mirror_fsx_compare.sh b/qa/workunits/rbd/rbd_mirror_fsx_compare.sh index 21eba1205cbff..0ba3c97d7519f 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 -- 2.39.5