diff --git a/scripts/github/guide/host_deploy.sh b/scripts/github/guide/host_deploy.sh index 755bc61027..a1891735e4 100755 --- a/scripts/github/guide/host_deploy.sh +++ b/scripts/github/guide/host_deploy.sh @@ -23,8 +23,10 @@ PREP="$(docker run -d --entrypoint sleep "${GUIDE_RUNTIME_IMAGE}" infinity)" docker exec "${PREP}" sh -c ' set -e if command -v apt-get >/dev/null 2>&1; then - apt-get update - DEBIAN_FRONTEND=noninteractive apt-get install -y systemd systemd-sysv libnss-myhostname + APT_TIMEOUT=10m + APT_OPTS="-o Acquire::Retries=5 -o Acquire::http::Timeout=30 -o Acquire::https::Timeout=30" + timeout -k 30 "$APT_TIMEOUT" apt-get $APT_OPTS update + DEBIAN_FRONTEND=noninteractive timeout -k 30 "$APT_TIMEOUT" apt-get $APT_OPTS install -y systemd systemd-sysv libnss-myhostname elif command -v dnf >/dev/null 2>&1; then dnf install -y systemd elif command -v pacman >/dev/null 2>&1; then diff --git a/scripts/tests/deploy/utils/filesystem/docker_dataroot.sh b/scripts/tests/deploy/utils/filesystem/docker_dataroot.sh index 2e3cb679dc..b8a5f97358 100755 --- a/scripts/tests/deploy/utils/filesystem/docker_dataroot.sh +++ b/scripts/tests/deploy/utils/filesystem/docker_dataroot.sh @@ -177,8 +177,10 @@ esac install_packages() { if command -v apt-get >/dev/null; then - DEBIAN_FRONTEND=noninteractive apt-get update -qq - DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends "$@" + APT_TIMEOUT=10m + APT_OPTS=(-o Acquire::Retries=5 -o Acquire::http::Timeout=30 -o Acquire::https::Timeout=30) + DEBIAN_FRONTEND=noninteractive timeout -k 30 "${APT_TIMEOUT}" apt-get "${APT_OPTS[@]}" update -qq + DEBIAN_FRONTEND=noninteractive timeout -k 30 "${APT_TIMEOUT}" apt-get "${APT_OPTS[@]}" install -y --no-install-recommends "$@" elif command -v pacman >/dev/null; then pacman -Sy --noconfirm --needed "$@" elif command -v dnf >/dev/null; then diff --git a/scripts/tests/dns/install-dockerd.sh b/scripts/tests/dns/install-dockerd.sh index 4c14e51872..462909c714 100755 --- a/scripts/tests/dns/install-dockerd.sh +++ b/scripts/tests/dns/install-dockerd.sh @@ -6,8 +6,10 @@ if command -v pacman >/dev/null 2>&1; then pacman -Sy --noconfirm --needed docker bind fuse-overlayfs elif command -v apt-get >/dev/null 2>&1; then export DEBIAN_FRONTEND=noninteractive - apt-get update - apt-get install -y --no-install-recommends docker-ce containerd.io dnsutils fuse-overlayfs + APT_TIMEOUT=10m + APT_OPTS=(-o Acquire::Retries=5 -o Acquire::http::Timeout=30 -o Acquire::https::Timeout=30) + timeout -k 30 "${APT_TIMEOUT}" apt-get "${APT_OPTS[@]}" update + timeout -k 30 "${APT_TIMEOUT}" apt-get "${APT_OPTS[@]}" install -y --no-install-recommends docker-ce containerd.io dnsutils fuse-overlayfs elif command -v dnf >/dev/null 2>&1; then dnf -y install docker-ce containerd.io bind-utils fuse-overlayfs elif command -v yum >/dev/null 2>&1; then