Skip to content

fix(backup): a sentinel that is another volume's companion is not, on its own, a crossed mapping (#468) - #469

Merged
Gerrrt merged 1 commit into
mainfrom
gerrrt/sentinel-collision-468
Sep 14, 2026
Merged

Gerrrt merged 1 commit into
mainfrom
gerrrt/sentinel-collision-468

Conversation

@Gerrrt

@Gerrrt Gerrrt commented Sep 14, 2026

Copy link
Copy Markdown
Owner

What changed

scripts/backup-volumes.sh: verify() treats a foreign sentinel that is one of the volume's own COMPANIONS as a soft hit — foreign only when the volume's own sentinel is absent too, in --hot as well as strict. load_inventory() gains check_sentinel_table(), which refuses a table in which two volumes share a sentinel outright. The SENTINEL comment records the case; docs/roadmap.md gains the Done entry.

Why

#468. From 2026-09-13 both backup-volumes and verify-backups exit 2, and every loki-data archive on the host — five sets that verified clean on the 12th — fails:

loki-data: this archive carries the sentinel of paperless-data — it is not a loki-data backup

#133 set SENTINEL[paperless-data]="./index"; a Loki data volume has a top-level ./index, and the same script lists it under COMPANIONS[loki-data]. The change reached the host with 09f2cdc (2026-09-12); the first weekly run after it failed, and every nightly verify since. The archives are intact; no manifest since 2026-09-06.

./index stays — it was measured off a boot of the pinned image and nothing about Paperless changed. The check changes instead: a marker this volume is documented to carry cannot, alone, prove the archive belongs to somebody else. It still proves it when the volume's own marker is missing, which is what a mislabelled archive looks like and what a real Loki volume never does.

Blast radius

Verification logic only. No service, image, port, rule or credential changes. Existing behaviour is unchanged for every foreign sentinel that is not a companion of the volume under test.

  • No change to network segmentation or firewall rules
  • No new port published to a VLAN that could not already reach the service
  • No credential added outside secrets/*.sops.yaml

Verification

Fake sets, with a stand-in age on PATH that cats the file (this machine has no age):

Case Strict --hot
Loki archive: ./chunks, ./index, ./wal verified verified
Paperless-shaped archive filed as loki-data: ./index, ./log, no ./chunks FAIL — carries the sentinel of paperless-data FAIL (exit 1)
loki-data archive carrying ./grafana.db FAIL — unchanged behaviour —
Table with paperless-media also set to ./index dies at --inventory: paperless-data and paperless-media share the sentinel ./index —
  • shellcheck scripts/backup-volumes.sh clean
  • python3 scripts/check_docs.py — docs OK
  • make validate in full — not run here (no promtool/docker on this host); CI runs it
  • Deployed — converge is report-only; apply by hand after merge. Proof is the Sunday 2026-09-20 set and the nightly verify after it
  • Docs updated

Found from the wiki side by reading the units' journal out of Loki (Gerrrt/Lemmiwinks#279).

🤖 Generated with Claude Code

… its own, a crossed mapping (#468)

Since 2026-09-13 backup-volumes and verify-backups have both exited 2, and
every loki-data archive on the host — five sets that verified clean on the 12th
— failed the same line: "this archive carries the sentinel of paperless-data".
#133 gave paperless-data the sentinel ./index; a Loki data volume has a
top-level ./index of its own, listed two tables down as a loki-data companion,
and the change reached the host with the 2026-09-12 revision. The archives were
intact. No manifest was written after 2026-09-06 and nothing was pruned.

./index stays: it is the marker that was measured off a boot of the pinned
image, and nothing about Paperless changed. What changes is how verify() reads
a foreign sentinel that is one of the volume's own companions. It is now a
"soft" hit, counted as foreign only when the volume's own sentinel is absent
too — in --hot as well as strict, because an archive that carries
paperless-data's marker and lacks loki-data's is exactly the crossed mapping
the check exists to catch. A foreign sentinel that is not a companion is fatal
as before. load_inventory() additionally refuses a table in which two volumes
share a sentinel outright, the case owner[] cannot represent, so that class of
edit fails by name before any service is stopped.

Verified on fake sets with a stand-in for age: a Loki archive with ./chunks and
./index verifies in strict and hot modes; a Paperless-shaped archive filed as
loki-data (./index, no ./chunks) fails in both; a loki-data archive carrying
./grafana.db fails as before; a table with paperless-media set to ./index dies
at --inventory. shellcheck clean; check_docs.py passes. Not deployed — converge
is report-only, so the host applies it by hand; the next Sunday set is the
proof, and the nightly verify the day after.

Found from the wiki side by reading the units' journal out of Loki
(Gerrrt/Lemmiwinks#279).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant