Force IPv4 in the build VM and fix the APT cache path
All checks were successful
build-image / build (push) Successful in 13m15s
All checks were successful
build-image / build (push) Successful in 13m15s
The build logs here show the same stall measured on maas-samba-ad: a 28.5 MB apt fetch taking 31s and a 12.0 MB one taking 30s, while a 14.1 MB fetch completed in under a second. A fixed cost that ignores size is a timeout, not a bandwidth limit — QEMU's user-mode network advertises IPv6 that does not work, so apt's parallel connections black-hole on it and fall back to IPv4 only when the 30-second timeout expires. Patch the build VM's cloud-init seed from bootcmd, which runs before SSH is up and therefore covers upstream's apt calls too. On maas-samba-ad this took the same 28.5 MB fetch from 31s to 3s; no build has been run here since, and the README says so. APT_PROXY also never worked as documented: a cache cannot see inside a CONNECT tunnel, so repositories must be rewritten to plain http, and Debian 13 keeps the real mirror URLs in /etc/apt/mirrors/*.list behind the mirror+file: method, which the old sed missed. Drop the invented "roughly 700 MB" saving from the README. On maas-samba-ad a fully warm cache was worth about three seconds of a 4m40s build. This image pulls far more from the Proxmox repository, so the cache may matter more here, but that is unmeasured and is now listed as such. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -74,8 +74,11 @@ apt-mark hold cloud-init || true
|
||||
# Paket imzalari yine dogrulandigi icin guvenlik kaybi yok.
|
||||
if [ -n "${http_proxy:-}" ]; then
|
||||
log "APT onbellegi kullaniliyor (${http_proxy}); Debian depolari http'ye cevriliyor"
|
||||
sed -i 's|https://deb.debian.org|http://deb.debian.org|g; s|https://security.debian.org|http://security.debian.org|g' \
|
||||
/etc/apt/sources.list /etc/apt/sources.list.d/*.sources /etc/apt/sources.list.d/*.list 2>/dev/null || true
|
||||
# Debian 13 keeps the actual mirror URLs in /etc/apt/mirrors/*.list, reached
|
||||
# through the "mirror+file:" method, so rewriting sources.list alone misses them.
|
||||
sed -i 's|https://|http://|g' \
|
||||
/etc/apt/sources.list /etc/apt/sources.list.d/*.sources \
|
||||
/etc/apt/sources.list.d/*.list /etc/apt/mirrors/*.list 2>/dev/null || true
|
||||
fi
|
||||
|
||||
log "eatmydata kuruluyor"
|
||||
|
||||
Reference in New Issue
Block a user