fix(backup-drill): git fsck must not fail on a stale commit-graph #767

Stängd
öppnade 2026-10-17 19:10:46 +00:00 av supernaut · 3 kommentarer
Ägare

The restore drill's hot leg runs git fsck --connectivity-only with the repository's commit-graph enabled. A stale commit-graph turns the drill red although every object is present.

Seen

2026-10-17: after branches were deleted on bitborg/bitborg-infra and bitborg/bitborg-internal, their commit-graph still listed the removed commits. fsck failed with Could not read <sha> / failed to parse commit ... from object database for commit-graph (exit 16). With -c core.commitGraph=false all 15 repos passed. git commit-graph write --reachable fixed both repos.

Change

  • roles/backup-drill/templates/restore-hot-on-scratch.sh.j2: run the fsck with -c core.commitGraph=false, so it checks objects and connectivity, not the cache.
  • Optional: report a stale commit-graph as a warning metric instead of a failure.

Done when

  • The drill fsck ignores the commit-graph, with a test or a drill run on a repo with a stale graph.
The restore drill's hot leg runs `git fsck --connectivity-only` with the repository's commit-graph enabled. A stale commit-graph turns the drill red although every object is present. ## Seen 2026-10-17: after branches were deleted on `bitborg/bitborg-infra` and `bitborg/bitborg-internal`, their commit-graph still listed the removed commits. fsck failed with `Could not read <sha>` / `failed to parse commit ... from object database for commit-graph` (exit 16). With `-c core.commitGraph=false` all 15 repos passed. `git commit-graph write --reachable` fixed both repos. ## Change - `roles/backup-drill/templates/restore-hot-on-scratch.sh.j2`: run the fsck with `-c core.commitGraph=false`, so it checks objects and connectivity, not the cache. - Optional: report a stale commit-graph as a warning metric instead of a failure. ## Done when - [x] The drill fsck ignores the commit-graph, with a test or a drill run on a repo with a stale graph.
Upphovsperson
Ägare

Second finding, same drill (2026-10-17 19:12 UTC). The drill picks the newest hot snapshot, then boots the VM, then restores. An hourly hot run in that gap ran forget (keep-hourly keeps one per hour) and deleted the picked snapshot: Load(<snapshot/31ce02c604>) failed: The specified key does not exist. Fix in the same PR: ExecCondition=/bin/sh -c '! systemctl --user is-active -q bitborg-backup-drill.service' on the hot backup unit, so a hot run is skipped while a drill runs.

Second finding, same drill (2026-10-17 19:12 UTC). The drill picks the newest hot snapshot, then boots the VM, then restores. An hourly hot run in that gap ran `forget` (`keep-hourly` keeps one per hour) and deleted the picked snapshot: `Load(<snapshot/31ce02c604>) failed: The specified key does not exist`. Fix in the same PR: `ExecCondition=/bin/sh -c '! systemctl --user is-active -q bitborg-backup-drill.service'` on the hot backup unit, so a hot run is skipped while a drill runs.
Upphovsperson
Ägare

Triaged 2026-10-17: priority/high. The Sat 2026-10-24 drill must pass on or after that date before the 2026-10-26 purge (#585) can run, so this should land first. Pairs with #768.

Triaged 2026-10-17: priority/high. The Sat 2026-10-24 drill must pass on or after that date before the 2026-10-26 purge (#585) can run, so this should land first. Pairs with #768.
Upphovsperson
Ägare

Verified live 2026-10-18 with an on-demand drill after the #769 apply. The hot leg restored snapshot 2cfb3dff: bitborg_backup_drill_hot_status 0, 15 repos fsck-checked, 0 orphans. The hourly hot run at 09:17 UTC was Skipped due to 'exec-condition' while the drill was running, so the picked snapshot survived. The drill passed.

Verified live 2026-10-18 with an on-demand drill after the #769 apply. The hot leg restored snapshot 2cfb3dff: `bitborg_backup_drill_hot_status 0`, 15 repos fsck-checked, 0 orphans. The hourly hot run at 09:17 UTC was `Skipped due to 'exec-condition'` while the drill was running, so the picked snapshot survived. The drill passed.
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#767
Ingen beskrivning angiven.