From 5fb8cef38353f27d40b89b62a60b1c48e1a1dd5f Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Wed, 23 Sep 2026 09:41:49 +0200 Subject: image-builder: retry docker build once on failure The -current full build failed on 2026-09-23 after all ten steps had passed, at layer export, losing a race on the containerd snapshotter's content lock ("failed to open writer: ref ... locked for 74ms ... unavailable"). Disk was not the issue this time (73G free). The build cache pre-prune that works around this only runs under --force, so the normal gated nightly build had no guard. Add docker_build() to lib.sh: docker build, retried once. By the time the export fails every step is cached, so the retry is little more than a re-export. Used by build-full-image.sh and build-sbo-testbuild.sh, the two scripts that export ~20-33G images; bootstrap.sh's image is small and has never hit this. Self-check covers success, one failure, and two failures with a stub. Co-Authored-By: Claude Opus 5.5 --- image-builder/lib.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'image-builder/lib.sh') diff --git a/image-builder/lib.sh b/image-builder/lib.sh index 8a22828..9c519ac 100644 --- a/image-builder/lib.sh +++ b/image-builder/lib.sh @@ -91,3 +91,18 @@ require_mount() { local dir="${base}/slackware64-${version}" [[ -d "$dir" ]] || _err "NAS tree not mounted: ${dir}" } + +# docker_build ARGS... +# `docker build`, retried once on failure. The export of a large image can lose +# a race on the containerd snapshotter's content lock ("failed to open writer: +# ref ... locked for 74ms ... unavailable"); the -current full build did on +# 2026-09-23 after all ten steps had passed. The steps are cached by then, so a +# retry is little more than a re-export. +# ponytail: blind single retry; a real step failure costs one extra attempt +# (a full rebuild under --force/--no-cache). Match on the error text if that +# ever matters. +docker_build() { + docker build "$@" && return 0 + _warn " docker build failed; retrying once..." + docker build "$@" +} -- cgit v1.2.3