Restore drill fails (BackupDrillFailed): weekly drill overlaps the daily storage restic backup's repo lock #219
Etiketter
Inga etiketter
area/backups
area/ci
area/control-panel
area/identity
area/infra
area/observability
area/payments
area/security
area/storage
area/web
blocked
needs-info
needs-triage
ready-for-implementation
type
bug
type
chore
type
docs
type
epic
type
feature
type
task
wontfix
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Inget förfallodatum satt.
Beroenden
Inga beroenden satta
Referens
bitborg/bitborg-infra#219
Läser in…
Hänvisa till i nytt ärende
Ingen beskrivning angiven.
Ta bort grenen "%!s()"
Borttagning av en gren är permanent. Även om den borttagna grenen kan fortsätta existera en kort tid innan den faktiskt tas bort, kan det INTE ångras i de flesta fall. Vill du fortsätta?
Symptom
BackupDrillFailedfires (critical);gitborg_backup_drill_last_run_status=1. The weekly restore drill (bitborg-backup-drill.service, Sat 05:00) fails at the[storage]restic restore with exit 11.Root cause — restic repo lock collision
The daily storage-tier restic backup (
bitborg-backup-storage.service,backup_restic_on_calendar = *-*-* 05:00:00) and the weekly restore drill (Sat *-*-* 05:00:00) run in the same slot and overlap. The backup holds restic's exclusive repository lock for its ~3-minute run; the drill'srestic checktries to acquire the exclusive lock with no lock-wait and fails immediately:Confirmed via Loki (2026-07-25): storage backup 05:01:58 → 05:04:58 (snapshot
01ca3b8fsaved cleanly, 9.956 GiB); drill started 05:03:04; drillrestic checkat 05:04:02 → exit 11.New failure mode since the storage-tier restic decoupling (#188 / #211): before that,
[storage]lived in the age archive with no restic lock, so drill + backup never contended. Backups and the restore path are otherwise healthy — the backup snapshot is good and the drill restored Postgres + the data volume fine before hitting the lock. This is purely a lock-timing collision, not data loss.Fix
backup_drill_on_calendarSat 05:00→Sat 06:00(the daily storage backup at 05:00 finishes in ~3 min, so 06:00 is well clear).--retry-lock=10mto the drill's restic invocations (roles/backup-drill/templates/restore-on-scratch.sh.j2) so a concurrent backup is waited out rather than fatal (defence-in-depth).After merge/apply, run one off-peak manual drill to confirm green and clear the firing alert.