deploy-archive: the archive port's Omeka admin email is admin@archive.<apex> — under the private path's .idss.internal apex (ADR 0149) Omeka's installer rejects the TLD, aborts the first-boot install half-done, and no admin user ever exists #1274

Closed
opened 2026-09-06 10:54:02 +00:00 by matou-build-agent · 1 comment

Private-path archive drive 20260906T102817Z (commit 1592694b) redded at deploy-archive, 6/7 green (artifacts/legs.json, artifacts/verdict.json). The switch died at exit 4 (masked_exit); omeka-reconcile.service is the only failed unit (logs/guest-failed-units.log) and logs/guest-archive-keystore.log = NOT-MINTED.

The failure, in order

The reconciler's own log (logs/guest-omeka-reconcile.log) shows two distinct symptoms across two switches — no container with name or ID "omeka" found (status 125), then Failed to elevate privileges. (status 255/EXCEPTION). Neither is the cause. The container's own stdout (logs/guest-omeka-container.log, the collector GOTCHAS #176 added) carries it in plain text:

10:49:51 omeka[9495]: Installing Omeka S via CLI...
10:49:54 omeka[9495]: Installation failed:
10:49:54 omeka[9495]:  - 'archive.e2e-drive.idss.internal' is not a valid hostname for the email address
10:49:54 omeka[9495]:  - The input appears to be a DNS hostname but cannot match TLD against known list
10:49:54 omeka[9495]:  - The input appears to be a local network name but local network names are not allowed
10:49:54 podman[9574]: container died dbf67767... / podman-omeka.service: Main process exited, code=exited, status=1/FAILURE

The container restarts (restart counter is at 1, 10:49:58) and on the second boot reports:

10:50:00 omeka[9885]: Omeka S is already installed.
10:50:00 omeka[9885]: Processing LocalContexts...
10:50:04 omeka[9885]: Module 'LocalContexts' successfully downloaded.
10:50:04 omeka[9885]: Failed to elevate privileges.
10:50:04 omeka[9885]: ERROR: Failed to install modules: LocalContexts

So the aborted first install left the instance far enough along that the retry short-circuits at "already installed" — and the admin user is never created. Every subsequent omeka-s-cli verb that needs an identity fails to elevate: the entrypoint's own module install (above), and then our reconciler's mint, which is loud by design and takes the unit down with it.

The defect

internal/clan/archive.go:268-270 derives the Omeka admin email when none is carried:

adminEmail := cfg.AdminEmail
if adminEmail == "" {
	adminEmail = "admin@" + cfg.Host
}

rendered at internal/clan/archive.go:325 as OMEKA_ADMIN_EMAIL. AdminEmail is plumbed through internal/clan/archive_attach.go:52,90, but the only production caller — internal/clan/portroute.go:49 — constructs ArchiveLiveSet{Node: p.Node, Apex: p.Apex} and carries no AdminEmail. So the default is always what ships.

cfg.Host comes from hostnames.Service(live.Apex, ArchiveSlug) (ADR 0113), and on the private path the apex is <slug>.idss.internal — an accepted, deliberate ruling (ADR 0149: ".internal is the ICANN-reserved private-use TLD"). Omeka's installer validates the admin email's hostname against a known-TLD list and additionally refuses local network names, so admin@archive.<slug>.idss.internal can never pass. Every private-path community's archive port is wedged this way, not just the drive.

This was foreseen but not fixed. docs/GOTCHAS.md:6314 (entry #176) records: "Omeka's installer validates the admin email's TLD (.test/.local rejected), and on that failure the entrypoint EXITS (restart-loop) — admin@archive.<apex> under a public apex passes; the new collector makes it visible if it ever fails." It has now failed, on the private apex the caveat quietly excluded.

Suspected layer

The archive port's render (internal/clan/archive.go), specifically the admin-identity default — not the harness, not the #1254 readiness gate, not the #1255 admin-name fix, both of which held.

Why I refused to heal it — refusal rule 3 (product-behaviour surface)

The fix changes OMEKA_ADMIN_EMAIL, i.e. the login identity the archive admin account is provisioned with on every community's deploy. That is what a deploy does and what a community sees, so it is a ruling, not a heal. It also needs a real decision, because the obvious candidates each have consequences and several do not actually work:

  • a reserved/pseudo TLD (.internal, .invalid, .local, .test) — rejected by the same validator;
  • admin@localhost — likely caught by the "local network names are not allowed" leg;
  • a fixed placeholder under a real TLD — passes the validator, but hands the community an admin login at an address nobody owns;
  • the founding steward's real email — correct-feeling, but the archive attach step has no access to it today (portroute.go:49 carries only Node + Apex), so it needs plumbing and a founding-time source.

I deliberately did not take the cheap route of adding a drive-only AdminEmail override: that would turn the leg green while leaving every private-path community's archive broken, which is exactly the weakening this red exists to prevent.

Secondary defect, same unit (worth fixing alongside, not the cause)

The readiness poll at internal/clan/archive.go:512-522 treats any output that does not match the three keep-waiting patterns as ready:

case "$last" in
  *"not installed"*|*"doesn't exist or not readable"*|*"Failed to initialize"*)
    sleep 3 ;;
  *)
    ready=1; break ;;
esac

On switch 1 the container was mid-crash-loop, so poll try 2 got no such container — an infrastructure error, not readiness — fell into *), broke out as ready, and the loud mint at archive.go:534 then died on the same transient with status 125. This is the same race GOTCHAS #177 already described. It converts a transient into a hard deploy red and should treat podman's "no such container" (rc 125) as keep-waiting. It would not have saved this drive — switch 2 failed on the real cause — so it must not be fixed on its own and called done.

Suggested acceptance

  1. A private-path (.idss.internal apex) archive deploy installs Omeka S on first boot with an admin user present, pinned by a render test on the derived OMEKA_ADMIN_EMAIL for a .internal apex.
  2. omeka-reconcile mints and lands the key (guest-archive-keystore.log no longer NOT-MINTED).
  3. The poll no longer promotes podman rc-125 "no such container" to ready.
  4. GOTCHAS #176's public-apex caveat is corrected in the same commit as the fix.

drive 20260906T102817Z red at deploy-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 swit
evidence: /home/swarm/swarm/Matou/idss/test-results/private-path/20260906T102817Z on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured

Private-path archive drive `20260906T102817Z` (commit `1592694b`) redded at `deploy-archive`, 6/7 green (`artifacts/legs.json`, `artifacts/verdict.json`). The switch died at exit 4 (`masked_exit`); `omeka-reconcile.service` is the only failed unit (`logs/guest-failed-units.log`) and `logs/guest-archive-keystore.log` = `NOT-MINTED`. ## The failure, in order The reconciler's own log (`logs/guest-omeka-reconcile.log`) shows two distinct symptoms across two switches — `no container with name or ID "omeka" found` (status 125), then `Failed to elevate privileges.` (status 255/EXCEPTION). Neither is the cause. The container's own stdout (`logs/guest-omeka-container.log`, the collector GOTCHAS #176 added) carries it in plain text: ``` 10:49:51 omeka[9495]: Installing Omeka S via CLI... 10:49:54 omeka[9495]: Installation failed: 10:49:54 omeka[9495]: - 'archive.e2e-drive.idss.internal' is not a valid hostname for the email address 10:49:54 omeka[9495]: - The input appears to be a DNS hostname but cannot match TLD against known list 10:49:54 omeka[9495]: - The input appears to be a local network name but local network names are not allowed 10:49:54 podman[9574]: container died dbf67767... / podman-omeka.service: Main process exited, code=exited, status=1/FAILURE ``` The container restarts (`restart counter is at 1`, 10:49:58) and on the second boot reports: ``` 10:50:00 omeka[9885]: Omeka S is already installed. 10:50:00 omeka[9885]: Processing LocalContexts... 10:50:04 omeka[9885]: Module 'LocalContexts' successfully downloaded. 10:50:04 omeka[9885]: Failed to elevate privileges. 10:50:04 omeka[9885]: ERROR: Failed to install modules: LocalContexts ``` So the aborted first install left the instance far enough along that the retry short-circuits at "already installed" — and the **admin user is never created**. Every subsequent `omeka-s-cli` verb that needs an identity fails to elevate: the entrypoint's own module install (above), and then our reconciler's mint, which is loud by design and takes the unit down with it. ## The defect `internal/clan/archive.go:268-270` derives the Omeka admin email when none is carried: ```go adminEmail := cfg.AdminEmail if adminEmail == "" { adminEmail = "admin@" + cfg.Host } ``` rendered at `internal/clan/archive.go:325` as `OMEKA_ADMIN_EMAIL`. `AdminEmail` is plumbed through `internal/clan/archive_attach.go:52,90`, but the **only production caller** — `internal/clan/portroute.go:49` — constructs `ArchiveLiveSet{Node: p.Node, Apex: p.Apex}` and carries no `AdminEmail`. So the default is always what ships. `cfg.Host` comes from `hostnames.Service(live.Apex, ArchiveSlug)` (ADR 0113), and on the private path the apex is `<slug>.idss.internal` — an accepted, deliberate ruling (ADR 0149: "`.internal` is the ICANN-reserved private-use TLD"). Omeka's installer validates the admin email's hostname against a known-TLD list and additionally refuses local network names, so `admin@archive.<slug>.idss.internal` can never pass. **Every private-path community's archive port is wedged this way**, not just the drive. This was foreseen but not fixed. `docs/GOTCHAS.md:6314` (entry #176) records: "Omeka's installer validates the admin email's TLD (`.test`/`.local` rejected), and on that failure the entrypoint EXITS (restart-loop) — `admin@archive.<apex>` under a **public apex** passes; the new collector makes it visible if it ever fails." It has now failed, on the private apex the caveat quietly excluded. ## Suspected layer The archive port's render (`internal/clan/archive.go`), specifically the admin-identity default — not the harness, not the #1254 readiness gate, not the #1255 admin-name fix, both of which held. ## Why I refused to heal it — refusal rule 3 (product-behaviour surface) The fix changes `OMEKA_ADMIN_EMAIL`, i.e. the login identity the archive admin account is provisioned with on every community's deploy. That is what a deploy does and what a community sees, so it is a ruling, not a heal. It also needs a real decision, because the obvious candidates each have consequences and several do not actually work: - a reserved/pseudo TLD (`.internal`, `.invalid`, `.local`, `.test`) — rejected by the same validator; - `admin@localhost` — likely caught by the "local network names are not allowed" leg; - a fixed placeholder under a real TLD — passes the validator, but hands the community an admin login at an address nobody owns; - the founding steward's real email — correct-feeling, but the archive attach step has no access to it today (`portroute.go:49` carries only `Node` + `Apex`), so it needs plumbing and a founding-time source. I deliberately did **not** take the cheap route of adding a drive-only `AdminEmail` override: that would turn the leg green while leaving every private-path community's archive broken, which is exactly the weakening this red exists to prevent. ## Secondary defect, same unit (worth fixing alongside, not the cause) The readiness poll at `internal/clan/archive.go:512-522` treats any output that does not match the three keep-waiting patterns as **ready**: ``` case "$last" in *"not installed"*|*"doesn't exist or not readable"*|*"Failed to initialize"*) sleep 3 ;; *) ready=1; break ;; esac ``` On switch 1 the container was mid-crash-loop, so poll try 2 got `no such container` — an infrastructure error, not readiness — fell into `*)`, broke out as ready, and the loud mint at `archive.go:534` then died on the same transient with status 125. This is the same race GOTCHAS #177 already described. It converts a transient into a hard deploy red and should treat podman's "no such container" (rc 125) as keep-waiting. It would not have saved this drive — switch 2 failed on the real cause — so it must not be fixed on its own and called done. ## Suggested acceptance 1. A private-path (`.idss.internal` apex) archive deploy installs Omeka S on first boot with an admin user present, pinned by a render test on the derived `OMEKA_ADMIN_EMAIL` for a `.internal` apex. 2. `omeka-reconcile` mints and lands the key (`guest-archive-keystore.log` no longer `NOT-MINTED`). 3. The poll no longer promotes podman rc-125 "no such container" to ready. 4. GOTCHAS #176's public-apex caveat is corrected in the same commit as the fix. drive `20260906T102817Z` red at `deploy-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 swit` evidence: `/home/swarm/swarm/Matou/idss/test-results/private-path/20260906T102817Z` on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured <!-- rehearsal-sig: 5401f695e3a1 -->
Author
Member

Close-report — #1274 fixed & unit-proven (commit 6a1b795a)

Ruled by agent under ADR 0174 — veto anytime. A revertible render-default change, proven by render/unit tests in-session. The admin-email default is a member-facing login identity, so under ADR 0174 rule 3 the accept rides Ben's next digest — but drafting and shipping a sensible default never blocks, so the fix lands now. No credential / security-widening / trust-accept / data-destruction / non-routine spend was crossed.

What landed

internal/clan/archive.go — the empty-AdminEmail default now routes through a new defaultOmekaAdminEmail(host):

  • public path unchanged: admin@<ruled-host> (honest, community-scoped, a real apex TLD Omeka accepts);
  • private path (.idss.internal apex, ADR 0149): the fixed, validator-safe placeholder admin@archive.example.com. RFC 2606 reserves the example.com family — a real .com TLD Omeka's installer accepts, guaranteed never a deliverable mailbox. The admin email is a login identity, not a mailbox: each community's install still carries its OWN generated OMEKA_ADMIN_PASSWORD (the archive-secrets clan var), so a shared default login is not a shared credential. This mirrors the Grist port's fixed owner@data-collections.local default, under a TLD Omeka accepts where Grist's .local would fail. The one derived value feeds BOTH the first-boot install env AND the reconciler's mint user, so they name the same account (the fix to the "Failed to elevate privileges" chain: an admin user now exists to elevate).

Secondary defect fixed alongside (renderOmekaReconcile, GOTCHAS #177's race): the readiness poll now treats podman's rc-125 no container with name or ID / no such container as install-not-ready (keep-waiting), not "ready" — a container mid-crash-loop no longer breaks the poll out and kills the loud mint on the same transient.

GOTCHAS #176 public-apex caveat corrected in the same commit (acceptance #4): the "if it ever fails" it excluded did fail on the private path; documented the fix + the rule (a first-boot admin identity derived from a service host must survive the .internal apex).

The ruling this ticket asked for (the product-behaviour decision the diagnosing session refused)

The candidates the diagnosis listed and why the shipped one wins:

  • reserved/pseudo TLD (.internal/.invalid/.local/.test) — rejected by the same validator, doesn't work;
  • admin@localhost — caught by the "local network names not allowed" leg, doesn't work;
  • fixed placeholder under a real TLD → SHIPPED. The "address nobody owns" objection already applies to every port's install-admin identity (the public default admin@archive.<apex> has no mailbox either, and Grist ships owner@data-collections.local for every community) — because it is a username, not a delivery target. RFC 2606's example.com is the most honest form: it signals "placeholder, never deliverable" while passing the validator;
  • founding steward's real email — correct-feeling but the attach step carries no steward email today (portroute.go:49 = Node+Apex only). The AdminEmail plumbing is left intact (TestRenderArchive_CarriedAdminEmailWinsOverDefault proves a carried value still wins), so a future founding-time source drops in without touching this default.

I did NOT take the drive-only AdminEmail override the diagnosis warned against — this is a render-default fix, so it heals every private-path community's archive, not just the drive.

Proof

Red-first, then green:

  • TestRenderArchive_PrivatePathAdminEmailIsValidatorSafe — no .idss.internal in the install env OR the mint user; the placeholder in both (acceptance #1);
  • TestRenderArchive_PublicPathAdminEmailDerivesFromHost — public path unchanged;
  • TestRenderArchive_CarriedAdminEmailWinsOverDefault — the derivation is a default, not an override;
  • TestRenderArchive_ReadinessPollTreatsMissingContainerAsNotReady — acceptance #3.

go build ./... + go test ./internal/clan/ ./internal/provision/ ./control-plane/... green; gofmt/vet clean.

Deferred — live proof (NOT run in-session)

Acceptance #1 (install completes with an admin user present) and #2 (omeka-reconcile mints, guest-archive-keystore.log no longer NOT-MINTED) are runtime assertions provable only on a private-path archive drive — a paid clan-lab drive is non-routine spend, a one-way door under ADR 0174, so it is routed to the next rehearsal drive (the rehearsal-183 loop re-fires it), not spent here. The code that makes them pass is landed and unit-proven; the render for the mint path is unchanged except that its adminuser now names an account that actually exists. This is the same build-and-close pattern the sibling reds (#1271/#1255/#1254) followed — the drive re-fires separately.

Closing as fixed; the next deploy-archive drive is expected to green (or red one layer deeper, a fresh ticket).

## Close-report — #1274 fixed & unit-proven (commit `6a1b795a`) **Ruled by agent under ADR 0174 — veto anytime.** A revertible render-default change, proven by render/unit tests in-session. The admin-email default is a member-facing login identity, so under ADR 0174 rule 3 the **accept** rides Ben's next digest — but *drafting and shipping a sensible default never blocks*, so the fix lands now. No credential / security-widening / trust-accept / data-destruction / non-routine spend was crossed. ### What landed `internal/clan/archive.go` — the empty-`AdminEmail` default now routes through a new `defaultOmekaAdminEmail(host)`: - **public path unchanged:** `admin@<ruled-host>` (honest, community-scoped, a real apex TLD Omeka accepts); - **private path (`.idss.internal` apex, ADR 0149):** the fixed, validator-safe placeholder `admin@archive.example.com`. RFC 2606 reserves the `example.com` family — a real `.com` TLD Omeka's installer accepts, guaranteed never a deliverable mailbox. The admin email is a **login identity, not a mailbox**: each community's install still carries its OWN generated `OMEKA_ADMIN_PASSWORD` (the `archive-secrets` clan var), so a shared default login is not a shared credential. This mirrors the Grist port's fixed `owner@data-collections.local` default, under a TLD Omeka accepts where Grist's `.local` would fail. The one derived value feeds BOTH the first-boot install env AND the reconciler's mint user, so they name the same account (the fix to the "Failed to elevate privileges" chain: an admin user now exists to elevate). **Secondary defect fixed alongside** (`renderOmekaReconcile`, GOTCHAS #177's race): the readiness poll now treats podman's rc-125 `no container with name or ID` / `no such container` as install-not-ready (keep-waiting), not "ready" — a container mid-crash-loop no longer breaks the poll out and kills the loud mint on the same transient. **GOTCHAS #176** public-apex caveat corrected in the same commit (acceptance #4): the "if it ever fails" it excluded **did fail** on the private path; documented the fix + the rule (a first-boot admin identity derived from a service host must survive the `.internal` apex). ### The ruling this ticket asked for (the product-behaviour decision the diagnosing session refused) The candidates the diagnosis listed and why the shipped one wins: - reserved/pseudo TLD (`.internal`/`.invalid`/`.local`/`.test`) — **rejected by the same validator**, doesn't work; - `admin@localhost` — caught by the "local network names not allowed" leg, doesn't work; - **fixed placeholder under a real TLD → SHIPPED.** The "address nobody owns" objection already applies to *every* port's install-admin identity (the public default `admin@archive.<apex>` has no mailbox either, and Grist ships `owner@data-collections.local` for every community) — because it is a username, not a delivery target. RFC 2606's `example.com` is the *most honest* form: it signals "placeholder, never deliverable" while passing the validator; - founding steward's real email — correct-feeling but the attach step carries no steward email today (`portroute.go:49` = `Node`+`Apex` only). The `AdminEmail` plumbing is **left intact** (`TestRenderArchive_CarriedAdminEmailWinsOverDefault` proves a carried value still wins), so a future founding-time source drops in without touching this default. I did NOT take the drive-only `AdminEmail` override the diagnosis warned against — this is a render-default fix, so it heals **every** private-path community's archive, not just the drive. ### Proof Red-first, then green: - `TestRenderArchive_PrivatePathAdminEmailIsValidatorSafe` — no `.idss.internal` in the install env OR the mint user; the placeholder in both (acceptance #1); - `TestRenderArchive_PublicPathAdminEmailDerivesFromHost` — public path unchanged; - `TestRenderArchive_CarriedAdminEmailWinsOverDefault` — the derivation is a default, not an override; - `TestRenderArchive_ReadinessPollTreatsMissingContainerAsNotReady` — acceptance #3. `go build ./...` + `go test ./internal/clan/ ./internal/provision/ ./control-plane/...` green; `gofmt`/`vet` clean. ### Deferred — live proof (NOT run in-session) Acceptance #1 (install completes with an admin user present) and #2 (`omeka-reconcile` mints, `guest-archive-keystore.log` no longer `NOT-MINTED`) are **runtime** assertions provable only on a private-path archive drive — a paid clan-lab drive is non-routine spend, a **one-way door** under ADR 0174, so it is routed to the next rehearsal drive (the `rehearsal-183` loop re-fires it), not spent here. The code that makes them pass is landed and unit-proven; the render for the mint path is unchanged except that its `adminuser` now names an account that actually exists. This is the same build-and-close pattern the sibling reds (#1271/#1255/#1254) followed — the drive re-fires separately. Closing as fixed; the next `deploy-archive` drive is expected to green (or red one layer deeper, a fresh ticket).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Matou/idss#1274
No description provided.