From: Xiubo Li Date: Tue, 6 Apr 2021 07:24:56 +0000 (+0800) Subject: qa: retry cloning the ceph.git X-Git-Tag: v17.1.0~2326^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c160e972ab8b2f253cd147e4a02f1ade11f0d75a;p=ceph.git qa: retry cloning the ceph.git 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 --- diff --git a/qa/workunits/fs/snaps/snaptest-git-ceph.sh b/qa/workunits/fs/snaps/snaptest-git-ceph.sh index 0d11efedb73d..e203fd8823fe 100755 --- a/qa/workunits/fs/snaps/snaptest-git-ceph.sh +++ b/qa/workunits/fs/snaps/snaptest-git-ceph.sh @@ -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`