enroll-configure times out: guest-trust/id_ed25519 never written before eval preflight #410

Closed
opened 2026-08-10 18:36:30 +00:00 by ben · 2 comments
Owner

Failure

The #183 rehearsal drive against the one-droplet (own-vps) community got the operator app connected to the target VPS and into the standup sequence, then stalled forever on the enroll-configure leg's first sub-step ("Prepare the gateway configuration — eval preflight · machine vars", stuck at 16%) until the harness's 1200s leg budget elapsed and the Playwright drive threw:

JourneyFailure: journey leg "enroll-configure" went red: budget of 1200s elapsed at "enroll-configure" — last activity: no such identity: /home/dev/swarm/Matou/ourcloud/test-results/drive-droplet/20260810T181051Z/state/guest-trust/id_ed25519: No such file or …

The app's own progress UI (captured in test-failed-1.png / error-context.md) shows the same detail line rendered live to the user:

no such identity: /home/dev/swarm/Matou/ourcloud/test-results/drive-droplet/20260810T181051Z/state/guest-trust/id_ed25519: No such file or …

Evidence for the root cause

state/ has own-vps/known_hosts (142 bytes) and sops/age/keys.txt — both present — but no guest-trust/ directory exists anywhere under state/ (confirmed by listing state/: only Cache, Local Storage, clan-config, founding-state.json, own-vps, scratch, sops, plus Electron chrome dirs — no guest-trust). Whatever step is supposed to generate the SSH identity the eval-preflight/machine-vars step reads from state/guest-trust/id_ed25519 never ran, or wrote it somewhere else, before enroll-configure needed it.

droplet-journal.txt (2010 lines, real DigitalOcean droplet clan-lab-rehearsal-6f74fdfb, boot through 18:11–18:32) never shows any OurCloud-specific unit (caddy, kanidm, nextcloud, phpfpm) starting — only base Ubuntu/cloud-init boot and an SSH login from 134.199.154.244 at the very end (the rehearsal reporter connecting to gather diagnostics). This is consistent with the app never getting past its own local eval-preflight step to push any configuration to the droplet at all.

artifacts/legs.json is [] — no leg records were persisted this run — so I can't compare this against the previously-known own-VPS-carrier frontier's skip reasons; this does not look like that named "pairing never flips" frontier, since that implies legs run and a later step is skipped/blocked, whereas here the very first enroll-configure sub-step never had its prerequisite file and the drive never got any leg to "done" or to a recorded skip.

artifacts/journey.json ({"rows": null, "fault": null}) confirms founding rows were never captured either.

The logs/guest-*.log files (caddy, control-plane, kanidm, nextcloud-brand/setup, phpfpm, unit, failed-units, files-oidc) are all the same boilerplate — "no SSH hostfwd in .../ourcloud-guest.service — the guest was never created, so there is nothing to ask" — which is expected and NOT evidence of a fault: this journey uses the own-vps carrier (a real remote droplet), not the local qemu guest, so that guest was never supposed to exist. Likewise host.json's qemu: exit ENOENT: spawn qemu-system-x86_64 ENOENT is a generic host-capability probe, unrelated to this journey's carrier type.

Note commit 7cc95f6 just widened the enroll-configure ceiling to 20 minutes (the exact 1200s seen here) — that ceiling change cannot fix this failure, because the identity file will never appear no matter how long the harness waits; this is a deterministic missing-prerequisite bug, not a slow-step timing problem the ceiling was meant to absorb.

Suspected layer

Product, most likely: the standup/enroll flow generates trust material as it progresses (it did generate state/sops/age/keys.txt) but appears to be missing (or mis-ordering) the step that writes an SSH keypair to state/guest-trust/id_ed25519 before the "eval preflight · machine vars" sub-step reads it. It's also possible this is a harness fixture-seeding gap (analogous to how state/own-vps/known_hosts is pre-seeded) rather than something the app generates at runtime — I could not read the app/harness source under this sandbox (permission to read outside the run directory was denied) to determine which side is responsible for creating this file, so that disambiguation is left to whoever picks this up.

What plugging it needs

Find the code path that is supposed to produce state/guest-trust/id_ed25519 (keygen in the app's connect/founding flow, or a fixture seed step in the rehearsal harness alongside its own-vps/known_hosts seeding) and fix the ordering/generation so the identity exists before enroll-configure's eval-preflight sub-step reads it. Also confirm the eval-preflight step fails fast and marks the leg's fault frame (data-status="journey-fault") instead of spinning silently for the full 1200s budget when a required identity file is absent — the missing-file error was known immediately but wasn't surfaced as a resumable/non-resumable fault, only as a progress-bar detail line, so the drive doesn't get to use the seam's own fault taxonomy.

drive 20260810T181051Z red at wizard: drive red at wizard — the wizard died before any leg ran
evidence: test-results/…/20260810T181051Z/ on matou-workstation (legs.json, droplet-journal.txt, trace)

## Failure The `#183` rehearsal drive against the one-droplet (`own-vps`) community got the operator app connected to the target VPS and into the standup sequence, then stalled forever on the **enroll-configure** leg's first sub-step ("Prepare the gateway configuration — eval preflight · machine vars", stuck at 16%) until the harness's 1200s leg budget elapsed and the Playwright drive threw: ``` JourneyFailure: journey leg "enroll-configure" went red: budget of 1200s elapsed at "enroll-configure" — last activity: no such identity: /home/dev/swarm/Matou/ourcloud/test-results/drive-droplet/20260810T181051Z/state/guest-trust/id_ed25519: No such file or … ``` The app's own progress UI (captured in `test-failed-1.png` / `error-context.md`) shows the same detail line rendered live to the user: ``` no such identity: /home/dev/swarm/Matou/ourcloud/test-results/drive-droplet/20260810T181051Z/state/guest-trust/id_ed25519: No such file or … ``` ## Evidence for the root cause `state/` has `own-vps/known_hosts` (142 bytes) and `sops/age/keys.txt` — both present — but **no `guest-trust/` directory exists anywhere under `state/`** (confirmed by listing `state/`: only `Cache`, `Local Storage`, `clan-config`, `founding-state.json`, `own-vps`, `scratch`, `sops`, plus Electron chrome dirs — no `guest-trust`). Whatever step is supposed to generate the SSH identity the eval-preflight/machine-vars step reads from `state/guest-trust/id_ed25519` never ran, or wrote it somewhere else, before `enroll-configure` needed it. `droplet-journal.txt` (2010 lines, real DigitalOcean droplet `clan-lab-rehearsal-6f74fdfb`, boot through 18:11–18:32) never shows any OurCloud-specific unit (caddy, kanidm, nextcloud, phpfpm) starting — only base Ubuntu/cloud-init boot and an SSH login from `134.199.154.244` at the very end (the rehearsal reporter connecting to gather diagnostics). This is consistent with the app never getting past its own local eval-preflight step to push any configuration to the droplet at all. `artifacts/legs.json` is `[]` — **no leg records were persisted this run** — so I can't compare this against the previously-known own-VPS-carrier frontier's skip reasons; this does not look like that named "pairing never flips" frontier, since that implies legs run and a later step is skipped/blocked, whereas here the very first enroll-configure sub-step never had its prerequisite file and the drive never got any leg to "done" or to a recorded skip. `artifacts/journey.json` (`{"rows": null, "fault": null}`) confirms founding rows were never captured either. The `logs/guest-*.log` files (caddy, control-plane, kanidm, nextcloud-brand/setup, phpfpm, unit, failed-units, files-oidc) are all the same boilerplate — "no SSH hostfwd in .../ourcloud-guest.service — the guest was never created, so there is nothing to ask" — which is expected and NOT evidence of a fault: this journey uses the `own-vps` carrier (a real remote droplet), not the local qemu guest, so that guest was never supposed to exist. Likewise `host.json`'s `qemu: exit ENOENT: spawn qemu-system-x86_64 ENOENT` is a generic host-capability probe, unrelated to this journey's carrier type. Note commit `7cc95f6` just widened the enroll-configure ceiling to 20 minutes (the exact 1200s seen here) — that ceiling change cannot fix this failure, because the identity file will never appear no matter how long the harness waits; this is a deterministic missing-prerequisite bug, not a slow-step timing problem the ceiling was meant to absorb. ## Suspected layer **Product**, most likely: the standup/enroll flow generates trust material as it progresses (it did generate `state/sops/age/keys.txt`) but appears to be missing (or mis-ordering) the step that writes an SSH keypair to `state/guest-trust/id_ed25519` before the "eval preflight · machine vars" sub-step reads it. It's also possible this is a **harness** fixture-seeding gap (analogous to how `state/own-vps/known_hosts` is pre-seeded) rather than something the app generates at runtime — I could not read the app/harness source under this sandbox (permission to read outside the run directory was denied) to determine which side is responsible for creating this file, so that disambiguation is left to whoever picks this up. ## What plugging it needs Find the code path that is supposed to produce `state/guest-trust/id_ed25519` (keygen in the app's connect/founding flow, or a fixture seed step in the rehearsal harness alongside its `own-vps/known_hosts` seeding) and fix the ordering/generation so the identity exists before `enroll-configure`'s eval-preflight sub-step reads it. Also confirm the eval-preflight step fails fast and marks the leg's fault frame (`data-status="journey-fault"`) instead of spinning silently for the full 1200s budget when a required identity file is absent — the missing-file error was known immediately but wasn't surfaced as a resumable/non-resumable fault, only as a progress-bar detail line, so the drive doesn't get to use the seam's own fault taxonomy. drive `20260810T181051Z` red at `wizard`: `drive red at wizard — the wizard died before any leg ran` evidence: `test-results/…/20260810T181051Z/` on matou-workstation (legs.json, droplet-journal.txt, trace) <!-- rehearsal-sig: dcf630511b50 -->
Author
Owner

Direction-settling addendum (manual session, same red): the fix is not to mint guest-trust on the own-VPS path — ADR 0152 already rules the identity story: own-VPS founds by the helper driving out over "SSH to root@<IP> with the operator's own key (the access their provider gave them)", FullInstall/seed/supply/deploy all over that same access. guest-trust is the local-guest founding's mint (ADR 0126); a droplet founding has no business creating it.

The seam: app/helper/cmd/helper/wiring_prod.go:288 wires the clan adapter's SSH identity unconditionally to filepath.Join(guestTrustDir(), "id_ed25519"). Right for local-guest, wrong for own-VPS clan.Enroll{Install: FullInstall} — the identity must be per-target: guest-trust for the local VM, the carrier's connect identity for own-VPS (in the rehearsal that's the workstation's default key; the state dir's own-vps/known_hosts shows the carrier's own connection is healthy).

Bonus closure: this same defect explains the previous run's "SSH storm" (171130Z, 180 preauth-aborted connects @1–4s) — ssh -i <missing file> dies instantly pre-auth and the install tooling retries. That supersedes #406's closing conclusion ("external tool's normal takeover behaviour") — it was this bug both times; the #407 ceiling widening simply let this run live long enough to print the real error onto the fault line.

Direction-settling addendum (manual session, same red): the fix is **not** to mint `guest-trust` on the own-VPS path — **ADR 0152 already rules the identity story**: own-VPS founds by the helper driving out over "SSH to `root@<IP>` with the **operator's own key** (the access their provider gave them)", FullInstall/seed/supply/deploy all over that same access. `guest-trust` is the *local-guest* founding's mint (ADR 0126); a droplet founding has no business creating it. The seam: `app/helper/cmd/helper/wiring_prod.go:288` wires the clan adapter's SSH identity **unconditionally** to `filepath.Join(guestTrustDir(), "id_ed25519")`. Right for local-guest, wrong for own-VPS `clan.Enroll{Install: FullInstall}` — the identity must be per-target: guest-trust for the local VM, the carrier's connect identity for own-VPS (in the rehearsal that's the workstation's default key; the state dir's `own-vps/known_hosts` shows the carrier's own connection is healthy). Bonus closure: this same defect explains the previous run's "SSH storm" (`171130Z`, 180 preauth-aborted connects @1–4s) — `ssh -i <missing file>` dies instantly pre-auth and the install tooling retries. That supersedes #406's closing conclusion ("external tool's normal takeover behaviour") — it was this bug both times; the #407 ceiling widening simply let this run live long enough to print the real error onto the fault line.
Author
Owner

Fixed in 79a1437 (on origin/main).

Root cause (Product): the founding clan adapter carries the local VM's guest-trust -i for ALL enrollments (newClanAdapter(guestTrustDir/id_ed25519), ADR 0126), so the own-VPS enrollment's --target-host URI drove -i .../state/guest-trust/id_ed25519. But the own-VPS box is the operator's OWN, reached over the ambient key the connect leg proved (ADR 0152 shape A / DDR 0154); it never had the guest-trust public half in its authorized_keys, and the own-VPS path never mints that key (only privatepath.go does, for the local VM). So clan's ssh died on a file that would never appear — a deterministic missing prerequisite, not a slow step (#407's ceiling widen could not fix it, as the issue noted).

Fix:

  • clan.EnrollRequest gains AmbientSSH, recorded durably on the enrollment snapshot. installOwnVPS sets it; enrollment.identity() then renders every own-VPS --target-host bare (no IdentityFile), leaving the private VM path (guest-trust) unchanged.
  • The eval gate no longer spins on a missing prerequisite: Advance now os.Stats a named identity file up front and fails fast with a classified connectivity fault (a fault frame the drive renders as journey-fault) before shelling out to clan — never the silent 1200s spin.

Tests: seam tests in internal/clan/enrollment_test.go (ambient renders bare despite a configured identity; a missing identity faults fast without invoking clan/nix); founding test internal/founding/ownvpspath_test.go asserts req.AmbientSSH. Full go test ./internal/... green; pushed through the pre-push go-ci gate.

Whether the harness fixture also needs to seed nothing here is moot — the app no longer reads that path on the own-VPS carrier.

Fixed in `79a1437` (on origin/main). **Root cause (Product):** the founding clan adapter carries the local VM's guest-trust `-i` for ALL enrollments (`newClanAdapter(guestTrustDir/id_ed25519)`, ADR 0126), so the own-VPS enrollment's `--target-host` URI drove `-i .../state/guest-trust/id_ed25519`. But the own-VPS box is the operator's OWN, reached over the ambient key the connect leg proved (ADR 0152 shape A / DDR 0154); it never had the guest-trust public half in its authorized_keys, and the own-VPS path never mints that key (only `privatepath.go` does, for the local VM). So `clan`'s ssh died on a file that would never appear — a deterministic missing prerequisite, not a slow step (#407's ceiling widen could not fix it, as the issue noted). **Fix:** - `clan.EnrollRequest` gains `AmbientSSH`, recorded durably on the enrollment snapshot. `installOwnVPS` sets it; `enrollment.identity()` then renders every own-VPS `--target-host` **bare** (no IdentityFile), leaving the private VM path (guest-trust) unchanged. - The eval gate no longer spins on a missing prerequisite: `Advance` now `os.Stat`s a named identity file up front and **fails fast** with a classified `connectivity` fault (a fault frame the drive renders as `journey-fault`) before shelling out to clan — never the silent 1200s spin. **Tests:** seam tests in `internal/clan/enrollment_test.go` (ambient renders bare despite a configured identity; a missing identity faults fast without invoking clan/nix); founding test `internal/founding/ownvpspath_test.go` asserts `req.AmbientSSH`. Full `go test ./internal/...` green; pushed through the pre-push go-ci gate. Whether the harness fixture also needs to seed nothing here is moot — the app no longer reads that path on the own-VPS carrier.
ben closed this issue 2026-08-10 18:53:06 +00:00
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#410
No description provided.