mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 21:55:20 +00:00
scripts: Workaround random wget failures on AArch64
Random failures of downloading `cloud-hypervisor-static-aarch64` with
`wget` were seen. The commit applies a workaround to retry the download
for a few times.
Signed-off-by: Michael Zhao <michael.zhao@arm.com>
(cherry picked from commit f0c5592ba1
)
This commit is contained in:
parent
82f1dcea3c
commit
028c3054ea
@ -162,8 +162,21 @@ update_workloads() {
|
|||||||
CH_RELEASE_URL="https://github.com/cloud-hypervisor/cloud-hypervisor/releases/download/$LAST_RELEASE_VERSION/cloud-hypervisor-static-aarch64"
|
CH_RELEASE_URL="https://github.com/cloud-hypervisor/cloud-hypervisor/releases/download/$LAST_RELEASE_VERSION/cloud-hypervisor-static-aarch64"
|
||||||
CH_RELEASE_NAME="cloud-hypervisor-static-aarch64"
|
CH_RELEASE_NAME="cloud-hypervisor-static-aarch64"
|
||||||
pushd $WORKLOADS_DIR
|
pushd $WORKLOADS_DIR
|
||||||
time wget --quiet $CH_RELEASE_URL -O "$CH_RELEASE_NAME" || exit 1
|
# Repeat a few times to workaround a random wget failure
|
||||||
chmod +x $CH_RELEASE_NAME
|
WGET_RETRY_MAX=10
|
||||||
|
wget_retry=0
|
||||||
|
|
||||||
|
until [ "$wget_retry" -ge "$WGET_RETRY_MAX" ]
|
||||||
|
do
|
||||||
|
time wget $CH_RELEASE_URL -O "$CH_RELEASE_NAME" && break
|
||||||
|
wget_retry=$((wget_retry+1))
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ $wget_retry -ge "$WGET_RETRY_MAX" ]; then
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
chmod +x $CH_RELEASE_NAME
|
||||||
|
fi
|
||||||
popd
|
popd
|
||||||
|
|
||||||
# Build custom kernel for guest VMs
|
# Build custom kernel for guest VMs
|
||||||
|
Loading…
Reference in New Issue
Block a user