Page MenuHomePhabricator

scap backport failed due to expired debian snapshot
Closed, ResolvedPublic

Description

scap backport failed due to an expired debian snapshot:

[0251][tstarling@deploy1003:~]$ scap backport 1340801 1340802 
...
03:00:24 [mediawiki-publish-85-next] E: Release file for http://snapshot.debian.org/archive/debian/20260906T040200Z/dists/bookworm-updates/InRelease is expired (invalid since 1d 0h 47min 38s). Updates for this repository will not be applied.
03:00:24 [mediawiki-publish-85-next] E: Release file for http://snapshot.debian.org/archive/debian-security/20260906T040200Z/dists/bookworm-security/InRelease is expired (invalid since 23h 35min 57s). Updates for this repository will not be applied.
03:00:24 [mediawiki-publish-83-next] E: Release file for http://snapshot.debian.org/archive/debian/20260906T040200Z/dists/bookworm-updates/InRelease is expired (invalid since 1d 0h 47min 38s). Updates for this repository will not be applied.
03:00:24 [mediawiki-publish-83-next] E: Release file for http://snapshot.debian.org/archive/debian-security/20260906T040200Z/dists/bookworm-security/InRelease is expired (invalid since 23h 35min 57s). Updates for this repository will not be applied.
...
03:00:25 [mediawiki-publish-85-next] The command '/bin/sh -c apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y php${PHP_VERSION}-xhprof' returned a non-zero code: 100

snapshot.debian.org says

To access snapshots of suites using Valid-Until that are older than a dozen days, it is necessary to ignore the Valid-Until header within Release files, in order to prevent apt from disregarding snapshot entries ("Release file expired"). Use aptitude -o Acquire::Check-Valid-Until=false update or apt-get -o Acquire::Check-Valid-Until=false update for this purpose."

Event Timeline

• tstarling renamed this task from scap backport due to expired debian snapshot to scap backport failed due to expired debian snapshot.Mon, Sep 14, 3:38 AM

The base image is broken. Locally I can do

$ docker run -it docker-registry.wikimedia.org/bookworm:latest
root@9efc76ae3ac4:/# cat /etc/apt/sources.list.d/debian.sources 
Types: deb
URIs: http://snapshot.debian.org/archive/debian/20260913T040200Z
Suites: bookworm bookworm-updates
Components: main
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg

Types: deb
URIs: http://snapshot.debian.org/archive/debian-security/20260913T040200Z
Suites: bookworm-security
Components: main
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg

That's the expired snapshot.

I think I've found where this comes from in debuerreotype, and I found wt:Kubernetes/Images#Base_images which explains how to rebuild the base images.

Mentioned in SAL (#wikimedia-operations) [2026-09-14T04:52:58Z] <TimStarling> on build2001 rebuilding base images T437829

Base image build gave warnings:

warning: no apparent 'bookworm/updates/main' for 'amd64' on any of the following; skipping
  - http://snapshot.debian.org/archive/debian-security/20260914T045700Z
warning: no apparent 'bookworm-updates/main' for 'amd64' on any of the following; skipping
  - http://snapshot.debian.org/archive/debian/20260914T045700Z
W: Failed to fetch http://snapshot.debian.org/archive/debian/20260914T045700Z/dists/bookworm/InRelease  Could not connect to snapshot.debian.org:80 (2a04:4e42:1b::644), connection timed out Could not connect to snapshot.debian.org:80 (146.75.106.132), connection timed out
W: Some index files failed to download. They have been ignored, or old ones used instead.

And I don't see the snapshot repo in /etc/apt/sources.list.d in the new image.

Mentioned in SAL (#wikimedia-operations) [2026-09-14T05:39:57Z] <_joe_> force-running build-base-images on build2004 for T437829

Mentioned in SAL (#wikimedia-operations) [2026-09-14T05:51:27Z] <_joe_> pulled bookworm:latest from build2004 to build2001 T437829

Change #1340943 had a related patch set uploaded (by Giuseppe Lavagetto; author: Giuseppe Lavagetto):

[operations/puppet@production] build-production-images: remove buster from base images

https://gerrit.wikimedia.org/r/1340943

Change #1340943 merged by Giuseppe Lavagetto:

[operations/puppet@production] build-production-images: remove buster from base images

https://gerrit.wikimedia.org/r/1340943

hashar subscribed.

There was a similar issue (Release file expired) that surfaced on Friday 4th and filed as T437069

I think it's mostly a bug in debuerreotype. The purpose of using snapshot.debian.org is for reproducible builds. The build isn't reproducible after the snapshot expires unless you configure apt to ignore Valid-Until. It doesn't seem to be intentional. I'm happy to file it upstream.

I think it's mostly a bug in debuerreotype. The purpose of using snapshot.debian.org is for reproducible builds. The build isn't reproducible after the snapshot expires unless you configure apt to ignore Valid-Until.

Agreed.

It doesn't seem to be intentional. I'm happy to file it upstream.

Sounds good!

Change #1341110 had a related patch set uploaded (by Muehlenhoff; author: Muehlenhoff):

[operations/puppet@production] build-bare-slim: Avoid snapshot.debian.org by using --non-debian (WIP)

https://gerrit.wikimedia.org/r/1341110

I think it's mostly a bug in debuerreotype. The purpose of using snapshot.debian.org is for reproducible builds. The build isn't reproducible after the snapshot expires unless you configure apt to ignore Valid-Until. It doesn't seem to be intentional. I'm happy to file it upstream.

Looking at https://github.com/debuerreotype/debuerreotype/issues/75#issuecomment-557637414 using the (a little confusingly named) --non-debian option might already do what we need: https://gerrit.wikimedia.org/r/c/operations/puppet/+/1341110

• taavi triaged this task as Unbreak Now! priority.Mon, Sep 14, 1:39 PM
• taavi subscribed.

Not being able to deploy any MW patches sounds like an UBN, so boldly setting priority.

The weekly rebuild from yesterday failed as "buster" was still listed, but had been garbage-collected from the registry as part of the S3 migration work. Giuseppe merged https://gerrit.wikimedia.org/r/c/operations/puppet/+/1340943 earlier and I've kicked off a fresh rebuild of the production images, it's running on build2004 (production-images-weekly-rebuild.service).

This is also an issue for us at toolforge. we started getting similar failure messages while trying to build trixie based images.
See https://phabricator.wikimedia.org/T437069#12318562 for more context

Not being able to deploy any MW patches sounds like an UBN, so boldly setting priority.

That has been resolved this morning.

dancy claimed this task.

Looking at https://github.com/debuerreotype/debuerreotype/issues/75#issuecomment-557637414 using the (a little confusingly named) --non-debian option might already do what we need: https://gerrit.wikimedia.org/r/c/operations/puppet/+/1341110

It just turns off reproducible builds. If I did a PR which gave us non-expiring reproducible builds, would that be useful?

Change #1341110 abandoned by Muehlenhoff:

[operations/puppet@production] build-bare-slim: Avoid snapshot.debian.org by using --non-debian (WIP)

Reason:

Alternate approach was chosen at https://phabricator.wikimedia.org/T438866

https://gerrit.wikimedia.org/r/1341110