From 21f017292101fba99f3cf9fcb8a96a5c21dcd728 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Thu, 20 Aug 2026 08:50:20 +0200 Subject: [PATCH] fix(ci): bound the last three unbounded apt call sites ba8a72309 bounded scripts/install/apt.sh and d50ba46b0 bounded the swarm bootstrap; these three were the remainder, and one of them was still costing whole jobs. docker_dataroot.sh hung Nextcloud#7 (job 96179137223, run 32284644282) for 5h40m: "installing zfsutils-linux for zpool" at 19:50:39 is the last line before "rc=124 after 20400s" at 01:30:39, with nothing in between. distros.sh's global budget is the only ceiling below these calls, so one stalled fetch also takes the untried distros with it. Both update and install are wrapped, not just update - that hang sat in the install, and apt-get install fetches from the same mirror. Constants come verbatim from scripts/install/apt.sh:19-20 rather than being re-derived. host_deploy.sh runs inside a container via `docker exec ... sh -c`, where POSIX sh has no arrays, so its options are a word-split string instead. Co-Authored-By: Claude Opus 5 (1M context) --- scripts/github/guide/host_deploy.sh | 6 ++++-- scripts/tests/deploy/utils/filesystem/docker_dataroot.sh | 6 ++++-- scripts/tests/dns/install-dockerd.sh | 6 ++++-- 3 files changed, 12 insertions(+), 6 deletions(-) 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