Dockerfiles/oc-dev: fix flaky LLVM install (IPv4 + reset trust anchor… - #618
Closed
albert-mueller wants to merge 1 commit into
Closed
Dockerfiles/oc-dev: fix flaky LLVM install (IPv4 + reset trust anchor…#618albert-mueller wants to merge 1 commit into
albert-mueller wants to merge 1 commit into
Conversation
… on retry) The llvm.sh retry loop could fail permanently instead of recovering: 1. apt.llvm.org resolves to both an A and an AAAA record. On runners/ BuildKit sandboxes without working IPv6 egress, wget can pick the AAAA record and fail with "Network is unreachable" instead of falling back to IPv4. 2. If a wget call inside llvm.sh is interrupted by that failure while writing /etc/apt/trusted.gpg.d/apt.llvm.org.asc, it leaves behind an empty/corrupt key file. llvm.sh only (re)downloads the key when that file is absent, so every subsequent retry in the loop reuses the broken key and apt-get update fails with NO_PUBKEY, even once the network recovers. Fix: prefer IPv4 for wget via /etc/wgetrc, and remove the trust anchor and any partially-added apt.llvm.org sources list entry at the start of every retry iteration, so a bad attempt cannot poison the ones after it. CI log of the original failure: image 'Linux CLANGDWARF' job, docker compose build-duet, all 5 llvm.sh attempts failing (2x unreachable IPv6, 3x NO_PUBKEY from a stale key file left by a previous attempt).
Contributor
|
This is garbage, because e.g. /etc/wgetrc may not exist before your command. Please stop pushing weird stuff here, this is not wanted. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dockerfiles/oc-dev: fix flaky LLVM install (IPv4 + reset trust anchor on retry)
The llvm.sh retry loop could fail permanently instead of recovering:
BuildKit sandboxes without working IPv6 egress, wget can pick the
AAAA record and fail with "Network is unreachable" instead of
falling back to IPv4.
writing /etc/apt/trusted.gpg.d/apt.llvm.org.asc, it leaves behind an
empty/corrupt key file. llvm.sh only (re)downloads the key when that
file is absent, so every subsequent retry in the loop reuses the
broken key and apt-get update fails with NO_PUBKEY, even once the
network recovers.
Fix: prefer IPv4 for wget via /etc/wgetrc, and remove the trust anchor
and any partially-added apt.llvm.org sources list entry at the start of
every retry iteration, so a bad attempt cannot poison the ones after it.
CI log of the original failure: image 'Linux CLANGDWARF' job, docker
compose build-duet, all 5 llvm.sh attempts failing (2x unreachable
IPv6, 3x NO_PUBKEY from a stale key file left by a previous attempt).
This should fix this error:
Annotations.txt