]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/workunits/rbd: wait max 2 hrs for all stress images to sync
authorJason Dillaman <dillaman@redhat.com>
Mon, 17 Sep 2018 20:20:57 +0000 (16:20 -0400)
committerJason Dillaman <dillaman@redhat.com>
Tue, 25 Sep 2018 20:08:59 +0000 (16:08 -0400)
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 <dillaman@redhat.com>
qa/workunits/rbd/rbd_mirror_fsx_compare.sh

index 21eba1205cbff405bb3b92b5ff2181aaf831b643..0ba3c97d7519fe029a3ef666fbb54a50338735ad 100755 (executable)
@@ -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