deploy-archive: the Omeka container never installs — the archive dataset's files dir is rendered owned 82:82, but the pinned erseco image runs as nobody (65534) #1271
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Reference
Matou/idss#1271
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The failure
Drive
20260906T065017Z, legdeploy-archive(sig5401f695e3a1), 6/7 green.artifacts/verdict.json→firstRedLeg: deploy-archiveat commit42980057. The switch dies at exit 4 (masked_exit) becauseomeka-reconcile.servicefails:That is a symptom, not the cause. The
omekacontainer is absent because it is crash-looping.The cause
logs/guest-omeka-container.log— every one of the three container starts (07:14:56, 07:15:10, 07:15:17) ends identically:The image's
/docker-entrypoint-init.d/02-configure-omeka.shruns underset -eu, so the failedinstall_cli.phpkills PID 1.omeka-reconcile's readiness poll (#1254) then races the restart window andpodman exec omeka …returns 125 — hence the reconcile failure, hence exit 4. The #1254 gate and the #1255OMEKA_ADMIN_NAMEfix both held; the red moved down one more layer.The defective line
internal/clan/archive.go:369(inrenderArchiveStore):with the comment at
internal/clan/archive.go:363-365that flags it as an unconfirmed guess:This drive is that confirmation, and 82 is wrong. Inspecting the pinned digest
docker.io/erseco/alpine-omeka-s@sha256:fb25223179f9…c038a4:Config.User=nobody→ uid 65534, gid 65534. The container process never runs as 82.82appears only as a group gid:/etc/group: www-data:x:82:nginx. The comment mistook a gid for a uid./var/www/html/filesis a symlink →volume/files; the image ships/var/www/html/volume/filesowned65534:65534.So the bind mount from
internal/clan/archive.go:332(<store>/files:/var/www/html/files) lands a host dir owned82:82mode0750under a process running as 65534 — no rwx, and PHP'sis_writable()returns false.Reproduced locally (matou-workstation, docker)
Byte-for-byte the drive's message, and cleared by the ownership change alone.
Suspected layer + what needs ruling
Layer: the archive-module render,
internal/clan/archive.go— not the harness. The narrow fix is one constant (82 82→65534 65534at line 369), but it is a deploy-behaviour change: it sets the on-disk ownership of a community's declared Archive dataset (ADR 0080), which P7 backup/restore reads back. The ruling needed is which fix:d <store>/files 0750 65534 65534 -— pin the image'snobodyuid into the community's dataset (smallest change; couples the dataset to an image-internal uid that a future digest bump could move)./var/www/html/volumeinstead of the symlink path/var/www/html/files, sincefilesis only a symlink into it — this would also persistconfig/,logs/,modules/,themes/, changing what a restore covers.user/--usernsor:Uon the container rather than hard-coding a uid insystemd.tmpfiles.rules.Note the sibling rule
d <store>/db 0750 999 999 -(internal/clan/archive.go:368) is correct — MariaDB 11.4 initialised cleanly at 07:14:33–07:14:53; do not churn on it.Why I refused rather than healed
Refusal rule 3 (product-behaviour surface).
internal/clan/archive.gorenders the NixOS config deployed to a community's gateway; changing the ownership of the Archive dataset's files directory alters what a deploy does and what a restore reads back. That is a design decision, not a heal — and the three candidate fixes above are not interchangeable. Precedent agrees: the two prior fixes to this same file (#1254, #1255) both landed as sandcastle commits, not healer commits.No edits were made; the working tree is clean.
drive
20260906T065017Zred atdeploy-archive:deploy failed (clean-retry): provision: deploy gateway: clan: deploy failed on 1 node(s): gateway: clan: masked_exit on gateway: clan reported success but the log shows a real failure: the remote switevidence:
/home/swarm/swarm/Matou/idss/test-results/private-path/20260906T065017Zon matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was capturedRuled by agent under ADR 0174 — veto anytime. Two-way door: a revertible one-constant render change, provable by an existing test + a byte-exact probe of the pinned image. Not on the one-way-door list (no credential, no security-posture widening, no member-/public-facing trust surface, no data destruction, no non-routine spend). The prior refusal correctly declined to heal this in-drive — the three candidate fixes are not interchangeable, so it belongs on a ticket with a stated ruling; that ruling is below. Precedent agrees the file is agent-rulable via a ticket: #1254 and #1255 both landed as sandcastle commits.
The ruling: candidate 1 — own the files subdir by the container's runtime uid
renderArchiveStorenow rendersd <store>/files 0750 65534 65534 -(internal/clan/archive.go, commite4698752). 65534 is the erseco image's actual runtime uid (Config.User = nobody), and it matches the established pattern of the siblingdbrule (999 999= MariaDB's runtime uid): own each bind-mount subdir by its consuming container's runtime uid. The old82 82mistook the www-data group gid (www-data:x:82:nginx) for a uid — no user has uid 82 in the image at all.Rejected the other two candidates:
volumeroot instead of thefilessymlink) — changes ADR 0080 / P7 restore coverage: it would persistconfig/,logs/,modules/,themes/, state the declarative env +OMEKA_MODULESshould re-derive on each rebuild, creating drift risk against the declarative model. A behaviour change beyond the bug.:U/--usernson the container) —:Urecursively chowns the community's whole dataset on every deploy (potentially large digital-heritage media), and fights the restore path. Heavier and riskier than owning the dir once via tmpfiles.Independently confirmed against the pinned digest (matou-workstation, docker)
Byte-exact, the rendered rule vs the bug:
So the fix clears the drive's exact failure (
"/var/www/html/files" is not a writable directory) by the ownership change alone; the reconcile 125 and the switch exit-4masked_exitwere downstream symptoms of the crash-loop.What landed
internal/clan/archive.go—renderArchiveStore:filesowner82 82→65534 65534; the misleading comment replaced with the confirmed uid rationale (db999 999left untouched — MariaDB initialised cleanly).internal/clan/archive_test.go— red-firstTestRenderArchive_FilesDirOwnedByContainerRuntimeUid: the render must own files65534 65534, the stale82 82must be gone, db stays999 999.docs/GOTCHAS.md— entry #177 (own a self-installing image's bind mount by the runtime uid, never a gid that looks like one).STATUS.md— header updated.Proof:
go build ./...+go test ./internal/clan/ ./control-plane/cmd/control-plane/ ./internal/catalogue/all green. Commite4698752, pushed tomain.The remaining end-to-end confirmation is the deferred clan-lab archive drive re-running
deploy-archivegreen (the layer this red sat under is now cleared; the #1254 gate and #1255 admin-name fix already held). No new door was needed.