Repository navigation
ci: the Tier 2 containers use another apt mirror on each attempt, the runner's own first - #5513
Merged
Merged
Conversation
… (Refs #5510) On 2026-11-23 apt-get update hung for 180 s in all 3 attempts against the one archive (run 45159376402). A mirror that accepts and never answers keeps apt past its bound on every index file, and apt's mirror method never drops it, so a mirror list does not help; another mirror per attempt does. New cases, against stubs: - host_apt_mirrors.container_mirrors: the runner's first plain-HTTP mirror, then http://archive.ubuntu.com and mirrors.edge.kernel.org; - Install Git: each attempt points the main source at the next mirror, in that order (the step's shell against the same fixtures), keeps an unknown sources layout, and the job mounts the host's /etc/apt; - ci-runtime.py: the delta starts at the runner's mirror, and its timeout retry fetches the index from the next one. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…EN (Fixes #5510) host_apt_mirrors.container_mirrors gives one mirror per attempt: the runner's own (the first plain-HTTP, non-security entry of its apt mirror list, lowest priority first), then http://archive.ubuntu.com/ubuntu/ and http://mirrors.edge.kernel.org/ubuntu/. The Tier 2 build container mounts the host's /etc/apt read-only at /run/host-apt. Install Git points the main source at the next mirror before each attempt, with the same rule as awk (it runs before checkout and uv), and keeps the sources when the stock security stanza is missing. ci-runtime.py starts the runtime delta at the runner's mirror, and its timeout retry fetches the index from the next one. The security pocket keeps security.ubuntu.com. docs/ci-tooling.md describes it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Problem
The Tier 2 Linux container jobs fetch from one Ubuntu mirror (#5510). On 2026-11-23,
apt-get updatein the build job'sInstall Git 📦hung for its full 180 s bound in all 3 attempts (run 45159376402, #5508), and #5142 failed in 3 different apt steps.A mirror list (apt's
mirror+file:) does not fix this. Test inubuntu:26.04(apt 3.2), with a fake first mirror that accepts connections and never answers, andarchive.ubuntu.comsecond:apt-get updateundertimeout 180exits 124 with Retries 0, 1 or 3 and Timeout 10 or 20 s. apt falls back file by file, waits the full timeout on the dead mirror for each index file, and never drops it.The hosted runners are also not always in Azure: the host jobs of the same day fetched from
http://us-east-2.ec2.archive.ubuntu.comandhttps://archive.ubuntu.com.Change
Another mirror on each attempt, the runner's own first:
ci/host_apt_mirrors.py:container_mirrors()returns the runner's mirror (the first plain-HTTP, non-security entry of its apt mirror list, lowest priority first) and thenFALLBACK_MIRRORS:http://archive.ubuntu.com/ubuntu/andhttp://mirrors.edge.kernel.org/ubuntu/(kernel.org's CDN). These are plain HTTP because the stock container has no CA certificates beforeInstall Git 📦./etc/aptread-only at/run/host-apt. It mounts the whole directory, not the file: a missing file would make Docker create a directory in its place on a persistent runner.Install Git 📦(the non-prebaked path) points the main source at the next mirror before each attempt and prints it. The step runs before checkout and uv, so it carries the same rule as awk. Without a host list it uses the fallbacks. Without the stock security stanza it keeps the image's sources and says so. The prebaked path does not change.ci-runtime.py: the runtime delta starts at the runner's mirror, and its timeout retry (ci: a timed-out Tier 2 runtime delta install retries once after dpkg recovery #5508) fetches the index from the next one. The switch is onesh -cthat changes nothing on an unknown layout.security.ubuntu.com, which answered in every test.docs/ci-tooling.mddescribes it.No user-visible change, so no features ledger line. No new workflow file.
Tests
test_host_apt_mirrors.ContainerMirrorsTest: the order for Azure and AWS runner lists, a list after the host priority swap, ties, no priority, the archive as the runner's mirror (no duplicate), only HTTPS or security entries, an empty list, no listtest_tier2_apt_cache:Install Git 📦uses another mirror on each attempt (Azure, archive, kernel.org; the security stanza unchanged)test_tier2_apt_cache: the step's shell gives the same order ascontainer_mirrors()for every case abovetest_tier2_apt_cache: an unknown sources layout is kept; the build container mounts/etc/aptread-onlytest_tier2_apt_cache.test_install_git_recovers_dpkg_before_each_retry(#5506), on the new shared harnesstest_tier2_runtime_delta: the delta starts at the runner's mirror; the timeout retry uses the next mirror and refreshes the index; the switch keeps an unknown layoutci/test_*.pymodules that readbuild-project.yaml,ci-runtimeorhost_apt_mirrorsThe new harness found a real bug before the push: without a host mirror list,
awkfailed on the missing file,pipefailpassed that on, and the step ended. The GREEN commit handles it, and the "no list" case covers it.Real run of the new step in
ubuntu:26.04, with a host list that names a fake hanging mirror as the runner's own: attempt 1 (http://127.0.0.1:18081/ubuntu/) failed at its 180 s bound, attempt 2 (http://archive.ubuntu.com/ubuntu/) installed git. rc=0 after 198 s,dpkg --auditclean, security source unchanged. Before this change, the same case failed all 3 attempts.Tiers 1 to 4 do not apply (CI only).
Test cost: no Rust tests. The new step cases run the step's shell with mocked
apt-getanddpkg, about 0.5 s each.Fixes #5510
🤖 Generated with Claude Code