fix(backup-drill): log restic errors in the hot leg and create the work dir 0700 #524

Sammanfogat
supernaut sammanfogade 1 incheckning från fix/158-drill-hot-restore in i main 2026-10-02 18:05:03 +00:00
Ägare

What

The first production drill (2026-10-02 17:19 UTC) passed the daily leg but failed the hot leg at restic restore (exit 1, under a second). restic's stderr was not captured, so the cause is not visible. A manual restore of the same snapshot outside the drill works (201.6 MiB, 7 s).

This PR makes the next run tell us why:

  • The snapshots step, the restore, the cleanup and the tar stream capture stderr and log it with the exit code on any non-zero exit. A restore failure also logs the work dir mode and uid.
  • The work dir is created 0700 right before the restore (the umask made it 0755).
  • On success the restore logs restic's summary line.

Ruled out by reading the code: a missing work dir (it is created before podman run -v). Still open: something that differs under the systemd unit.

Verification

--syntax-check, ansible-lint 0, rendered orchestrator passes py_compile. Local test with a fake podman that exits 1: the error and mode are logged and the dir is 0700.

Apply

Tag backup-drill: only the orchestrator script changes. Then run the drill by hand and read the logged restic error.

Refs #158

## What The first production drill (2026-10-02 17:19 UTC) passed the daily leg but failed the hot leg at `restic restore` (exit 1, under a second). restic's stderr was not captured, so the cause is not visible. A manual restore of the same snapshot outside the drill works (201.6 MiB, 7 s). This PR makes the next run tell us why: - The snapshots step, the restore, the cleanup and the tar stream capture stderr and log it with the exit code on any non-zero exit. A restore failure also logs the work dir mode and uid. - The work dir is created `0700` right before the restore (the umask made it 0755). - On success the restore logs restic's summary line. Ruled out by reading the code: a missing work dir (it is created before `podman run -v`). Still open: something that differs under the systemd unit. ## Verification `--syntax-check`, ansible-lint 0, rendered orchestrator passes `py_compile`. Local test with a fake `podman` that exits 1: the error and mode are logged and the dir is 0700. ## Apply Tag `backup-drill`: only the orchestrator script changes. Then run the drill by hand and read the logged restic error. Refs #158
supernaut lade till 1 incheckning 2026-10-02 17:43:02 +00:00
fix(backup-drill): log restic errors in the hot leg and create the work dir 0700
Alla kontroller lyckades
ci / ci (pull_request) Successful in 1m58s
497102de3c
The hot restore and the snapshot listing now capture stderr and log it
with the exit code on failure, plus the work dir mode and owner. The
cleanup and tar stream log theirs too. The work dir is created with an
explicit 0700 right before the restore.

Refs #158
supernaut tvångsskickade fix/158-drill-hot-restore från 497102de3c
Alla kontroller lyckades
ci / ci (pull_request) Successful in 1m58s
till 2b82a2bfe2
Alla kontroller lyckades
ci / ci (pull_request) Successful in 1m54s
2026-10-02 17:59:45 +00:00
Jämför
supernaut schemalade den här ändringsförfrågan för automatisk sammanfogning när alla kontroller lyckas 2026-10-02 18:00:26 +00:00
supernaut sammanfogade incheckning 232dec9fd5 till main 2026-10-02 18:05:03 +00:00
supernaut tog bort grenen fix/158-drill-hot-restore 2026-10-02 18:05:03 +00:00
Logga in för att delta i denna konversation.
Inga granskare
Ingen milstolpe
Inget projekt
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!524
Ingen beskrivning angiven.