fix(reconciler): reconciler-next container can write its metrics (keep-id) (#202) #218

Sammanfogat
supernaut sammanfogade 1 incheckning från fix/reconciler-next-textfile-perms in i main 2026-07-26 20:31:56 +00:00
Ägare

Fixes an EACCES the ADR-0035 dry-run rehearsal (#202) surfaced: the gitborg-reconciler-next container couldn't write its metrics file.

The image runs as node (uid 1000); rootless podman maps that to a subuid that can't write the bitborg-owned (0700) bind-mounted textfile dir → EACCES … reconciler.prom. Adding UserNS=keep-id:uid=1000,gid=1000 maps the container's node user to the host gitborg user, so it writes as the dir's owner; the dir stays bitborg-owned for node_exporter's read path.

The reconcile logic itself already ran fine (the metric write is best-effort/WARN, and the dry-run proposed actions appear correctly in the journal) — this restores the metrics file, which is required before the step-4 flip to apply so ReconcilerStale monitoring works against the container. Syntax-check + ansible-lint (production) + Prettier clean.

Refs #202, ADR 0035.

Fixes an EACCES the ADR-0035 dry-run rehearsal (#202) surfaced: the `gitborg-reconciler-next` container couldn't write its metrics file. The image runs as `node` (uid 1000); rootless podman maps that to a subuid that can't write the bitborg-owned (`0700`) bind-mounted textfile dir → `EACCES … reconciler.prom`. Adding `UserNS=keep-id:uid=1000,gid=1000` maps the container's node user to the host `gitborg` user, so it writes as the dir's owner; the dir stays bitborg-owned for node_exporter's read path. The reconcile logic itself already ran fine (the metric write is best-effort/WARN, and the dry-run proposed actions appear correctly in the journal) — this restores the metrics file, which is **required before the step-4 flip to apply** so `ReconcilerStale` monitoring works against the container. Syntax-check + ansible-lint (production) + Prettier clean. Refs #202, ADR 0035.
supernaut lade till 1 incheckning 2026-07-26 20:21:05 +00:00
The dry-run rehearsal surfaced EACCES writing
/home/gitborg/monitoring/textfile-reconciler-next/reconciler.prom: the image runs
as node (uid 1000), which rootless podman maps to a subuid that can't write the
gitborg-owned (0700) bind-mounted textfile dir. Add UserNS=keep-id:uid=1000,gid=1000
so the container's node user maps to host gitborg and writes as the dir's owner;
node_exporter's read path stays simple (dir remains gitborg-owned). The reconcile
itself already worked (metric write was best-effort/WARN) — this restores metrics,
required before the flip to apply so ReconcilerStale monitoring works.
supernaut sammanfogade incheckning a14952ac9f till main 2026-07-26 20:31:56 +00:00
supernaut tog bort grenen fix/reconciler-next-textfile-perms 2026-07-26 20:31:56 +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!218
Ingen beskrivning angiven.