Skip to content

containers: use the regular Ubuntu archive instead of snapshot.ubuntu.com - #66

Merged
KonradBreitsprecherBkd merged 2 commits into
mainfrom
fix/ubuntu-snapshot-retry
Nov 16, 2026
Merged

KonradBreitsprecherBkd merged 2 commits into
mainfrom
fix/ubuntu-snapshot-retry

Conversation

@KonradBreitsprecherBkd

@KonradBreitsprecherBkd KonradBreitsprecherBkd commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

The ubuntu-2004 image on main fails (runs 43865160132, 43868886269). snapshot.ubuntu.com answers many requests with 500/503, and which index files fail changes with every run. apt only warns about failed index downloads and continues with an incomplete package list, so the build fails later with a misleading Unable to locate package python3.

A first version of this PR retried apt-get update. That fixed the index errors, but the package downloads (259 packages, 161 MB) then ran at about 100 kB/s and the image build would take more than 30 minutes. So the snapshot is dropped instead.

Change

  • ubuntu-2004 and ubuntu-2204 read the regular Ubuntu archive. ubuntu-2204 (arm64) already did this in practice, because the snapshot has no ubuntu-ports; its leftover snapshot sed is removed as well.
  • UBUNTU_SNAPSHOT and the separate ca-certificates step (only needed for the https snapshot) are gone.
  • The retry script from the first version is removed again, so the net change is only the Dockerfiles.

Reproducibility

The same as for alma-8: a rebuild of the image can install newer package versions, and the installed versions are recorded in /etc/sil-kit-pkg-image-packages.txt. The packages stay reproducible, because release/packages.json pins the images by digest.

Tested

The Build Images run of this PR builds both Ubuntu images.

🤖 Generated with Claude Code

snapshot.ubuntu.com answers single requests with 500/503. apt only warns
about failed index downloads and continues with an incomplete package list,
so the ubuntu-2004 image build failed later with "Unable to locate package".
Which files failed changed with every run.

containers/utils/apt-update.sh runs apt-get update up to 6 times with an
increasing delay, treats "Failed to fetch" as a failure, and sets
Acquire::Retries for the package downloads. Both Ubuntu images use it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Requests then reach snapshot.ubuntu.com one at a time per connection.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@KonradBreitsprecherBkd
KonradBreitsprecherBkd merged commit af083c6 into main Nov 16, 2026
4 of 5 checks passed
@KonradBreitsprecherBkd KonradBreitsprecherBkd changed the title containers: retry apt-get update until all indexes are fetched containers: use the regular Ubuntu archive instead of snapshot.ubuntu.com Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant