]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: retry cloning the ceph.git 40611/head
authorXiubo Li <xiubli@redhat.com>
Tue, 6 Apr 2021 07:24:56 +0000 (15:24 +0800)
committerXiubo Li <xiubli@redhat.com>
Tue, 6 Apr 2021 08:02:45 +0000 (16:02 +0800)
The cloning may take a very long time, 2.5 hours for example, usally
it should be done in server minutes. If it really very slow, there
maybe something wrong with the current socket connections, retry it
maybe fixed.

This fixing will timeout the clone command after 30m, and retry it
by doubling the timeout value.

Fixes: https://tracker.ceph.com/issues/50021
Signed-off-by: Xiubo Li <xiubli@redhat.com>
qa/workunits/fs/snaps/snaptest-git-ceph.sh

index 0d11efedb73d46ba309bbf178a9e6510db01d97e..e203fd8823fe2b43ea205a59712cdea853b3d37a 100755 (executable)
@@ -2,7 +2,17 @@
 
 set -e
 
-git clone git://git.ceph.com/ceph.git
+# try it again if the clone is slow and the second time
+retried=false
+trap -- 'retry' EXIT
+retry() {
+    rm -rf ceph
+    # double the timeout value
+    timeout 3600 git clone git://git.ceph.com/ceph.git
+}
+rm -rf ceph
+timeout 1800 git clone git://git.ceph.com/ceph.git
+trap - EXIT
 cd ceph
 
 versions=`seq 1 21`