summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwbc6080 <wangbincheng4@huawei.com>2024-08-12 14:34:14 +0800
committerwbc6080 <wangbincheng4@huawei.com>2024-08-12 14:34:14 +0800
commit03d2e32da21af2a18417ea51eff95402667748e6 (patch)
tree706a5fb8ed74d1c59866bac375529056330a9f8a
parentMerge pull request #5790 from WillardHu/cleanup-kubeclient (diff)
downloadkubeedge-03d2e32da21af2a18417ea51eff95402667748e6.tar.gz
changing apt source after multiple failures
Signed-off-by: wbc6080 <wangbincheng4@huawei.com>
-rwxr-xr-xhack/local-up-kubeedge.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/hack/local-up-kubeedge.sh b/hack/local-up-kubeedge.sh
index a99635e73..cefe2009b 100755
--- a/hack/local-up-kubeedge.sh
+++ b/hack/local-up-kubeedge.sh
@@ -36,6 +36,11 @@ function install_cr() {
while [ $attempt_num -lt $max_attempts ]
do
+ if [ $attempt_num -eq 3 ]; then
+ echo "Download failed multiple times, try to change apt source ..."
+ sudo sed -i 's@//.*archive.ubuntu.com@//mirrors.ustc.edu.cn@g' /etc/apt/sources.list
+ sudo apt-get update
+ fi
if [[ "${CONTAINER_RUNTIME}" = "docker" ]]; then
install_docker
verify_docker_installed