From 2f97a2c283da4211c32ca1b790572426199c91cf Mon Sep 17 00:00:00 2001 From: reyesj2 <94730068+reyesj2@users.noreply.github.com> Date: Fri, 20 Nov 2026 16:36:04 -0600 Subject: [PATCH] keep GODEBUG local to the buildx copy and retry instead of docker push Exporting GODEBUG leaked http2client=0 into every later Go program the script runs, and prepending it let an existing http2client setting win. Set it as a prefix assignment on the copy only, and append it so it takes effect. The docker push fallback cannot work on Docker 29 with the containerd image store, which is why the copy uses buildx imagetools create, so retry the copy instead. --- salt/common/tools/sbin/so-image-common | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/salt/common/tools/sbin/so-image-common b/salt/common/tools/sbin/so-image-common index f11aaa095..bec61a2eb 100755 --- a/salt/common/tools/sbin/so-image-common +++ b/salt/common/tools/sbin/so-image-common @@ -205,13 +205,9 @@ update_docker_containers() { echo "Unable to determine verified digest for $image" >> "$LOG_FILE" 2>&1 exit 1 fi - # Force HTTP/1.1 for Go runtime clients (docker buildx) to prevent HTTP/2 - # stream multiplexing drops (PROTOCOL_ERROR) on large image layer uploads - # to the local embedded registry. - export GODEBUG="http2client=0${GODEBUG:+,${GODEBUG}}" - - docker buildx imagetools create --tag $HOSTNAME:5000/$IMAGEREPO/$image "$VERIFIED_REF" >> "$LOG_FILE" 2>&1 || \ - docker push $HOSTNAME:5000/$IMAGEREPO/$image >> "$LOG_FILE" 2>&1 || { + # imagetools create, not docker push: Docker 29's containerd store cannot push a + # freshly pulled image. GODEBUG prefix keeps http2client=0 local (#16342). + retry 3 10 "GODEBUG=\"${GODEBUG:+${GODEBUG},}http2client=0\" docker buildx imagetools create --tag $HOSTNAME:5000/$IMAGEREPO/$image $VERIFIED_REF" >> "$LOG_FILE" 2>&1 || { echo "Unable to copy $image to embedded registry" >> "$LOG_FILE" 2>&1 exit 1 }