registry-mirror: derive the Renovate tag, fail per image, add alerts #616

Stängd
öppnade 2026-10-08 21:12:24 +00:00 av supernaut · 0 kommentarer
Ägare

What

registry_mirror_images has docker.io/renovate/renovate:43 and bitborg/renovate:43 as literals (roles/registry-mirror/defaults/main.yml:39-40). renovate_image_tag: "43" is annotated for Renovate (roles/renovate/defaults/main.yml:50-51). The comment there says to keep them in lockstep by hand. The mirror script runs under set -e and the first failed skopeo copy skips all later images. bitborg_registry_mirror_last_run_status and _timestamp_seconds appear in no alert rule. docs/runbook.md:1880 calls the metric alertable and uses the legacy metric name.

Why

The mirror feeds CI pulls and the Renovate image. A silent failure stops dependency updates.

Failing case

  • Renovate bumps renovate_image_tag to 44 and it is deployed. The mirror still pushes only :43. podman run bitborg/renovate:44 fails with "manifest unknown". Every update PR stops.
  • A Docker Hub rate limit hits the first image. Forgejo, Postgres and Caddy are never mirrored. Nothing notices.

Fix

Derive both mirror values from {{ renovate_image_tag }}, as the other entries already do. Run each copy as skopeo copy ... || status=1 and exit with status at the end. Add RegistryMirrorFailed (status != 0) and RegistryMirrorStale (timestamp older than about 10 days). Fix the metric name in the runbook.

Done when

  • Bumping renovate_image_tag changes the mirror entry with no other edit.
  • One failing image does not stop the others and still exits non-zero.
  • Both alert rules exist and pass check-alert-rules.py.
## What `registry_mirror_images` has `docker.io/renovate/renovate:43` and `bitborg/renovate:43` as literals (`roles/registry-mirror/defaults/main.yml:39-40`). `renovate_image_tag: "43"` is annotated for Renovate (`roles/renovate/defaults/main.yml:50-51`). The comment there says to keep them in lockstep by hand. The mirror script runs under `set -e` and the first failed `skopeo copy` skips all later images. `bitborg_registry_mirror_last_run_status` and `_timestamp_seconds` appear in no alert rule. `docs/runbook.md:1880` calls the metric alertable and uses the legacy metric name. ## Why The mirror feeds CI pulls and the Renovate image. A silent failure stops dependency updates. ## Failing case - Renovate bumps `renovate_image_tag` to 44 and it is deployed. The mirror still pushes only `:43`. `podman run bitborg/renovate:44` fails with "manifest unknown". Every update PR stops. - A Docker Hub rate limit hits the first image. Forgejo, Postgres and Caddy are never mirrored. Nothing notices. ## Fix Derive both mirror values from `{{ renovate_image_tag }}`, as the other entries already do. Run each copy as `skopeo copy ... || status=1` and exit with `status` at the end. Add `RegistryMirrorFailed` (status != 0) and `RegistryMirrorStale` (timestamp older than about 10 days). Fix the metric name in the runbook. ## Done when - [ ] Bumping `renovate_image_tag` changes the mirror entry with no other edit. - [ ] One failing image does not stop the others and still exits non-zero. - [ ] Both alert rules exist and pass `check-alert-rules.py`.
Logga in för att delta i denna konversation.
Ingen milstolpe
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Förfallodatumet är ogiltigt eller utanför gränserna. Använd formatet "åååå-mm-dd".

Inget förfallodatum satt.

Beroenden

Inga beroenden satta

Referens
bitborg/bitborg-infra#616
Ingen beskrivning angiven.