own-VPS finish leg: ourcloud-control-plane.service never composed on a full-install gateway — restart fails "Unit not found" (GOTCHAS #18 recurrence, sig 8d0cd71d20a2) #443
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.
Blocks
Reference
Matou/idss#443
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?
Failure: drive
20260811T204058Z, red at thefinishleg.journey.droplet.spec.ts:240(expect(faultFrame).toHaveCount(0)) reds because the stand-up faults instead of reaching hand-off.state/founding-state.json'sstandup.fault:Root cause:
Fleet.SeedLedger(internal/fleetwire/fleet.go:138-140) runssystemctl restart ourcloud-control-planeon the gateway. That unit is declared only insiderenderGatewayGuest(internal/clan/vmguest.go:261-302), whose outputgateway-guest.nixis written only on the VM/LAN-join path —internal/clan/enrollment.go:397-403(thes.NodeConfig == nilbranch). This drive is own-VPS full-install (state/founding-state.json:access.kind: "own-vps", ip209.38.85.200), which takes the branch atenrollment.go:407-432: it writesnetworking.nix/disko.nix/platform.nix/access.nixbut nevergateway-guest.nix(confirmed by the comment atenrollment.go:417-420). So the composedconfiguration.nixfor a real droplet never importsgateway-guest.nix, andsystemd.services.ourcloud-control-plane(plusservices.kanidmandourcloud-self-trust, all defined in the same file) simply does not exist on the box — confirmed:grep -rn systemd.services.ourcloud-control-planeacross the repo hits onlyvmguest.goand its test.The earlier
deployinglog line"gateway deploy complete — the control plane is live"(internal/founding/deploy.go:346) is a false positive:applyControlPlane(deploy.go:357-379) only checks that the clan/NixOS activation itself succeeded (dep.Runreturning no error) — with no unit referencing the nonexistent control-plane service, the activation has nothing to fail on, so it reports success while nothing is actually running server-side.This is
docs/GOTCHAS.md#18 ("Gateway config inrenderGatewayGuestnever reaches the own-VPS gateway"), which explicitly predicts this class of recurrence. The prior commit3762a67(issue #442) fixed only the/var/lib/ourcloudtmpfiles rule for this exact divergence, by moving it intoledger.nix(internal/clan/gateway_attach.go:337-349,renderLedgerDir), written and imported on every gateway viaAttachGateway/baseMachineModules(gateway_attach.go:79,269-275). GOTCHAS #18's own "Rule" section says the config both shapes need must ride that same composition point, "NOTrenderGatewayGuest" — but the actualourcloud-control-planeunit,services.kanidm(+ itskanidm-tls/kanidm-adminsgenerators),ourcloud-self-trust, the IdP loopback bridge, the kanidm brand-push blocks, andgatewayAssertions()were all left behind in the VM-only render (vmguest.go:106-369).Suspected layer:
internal/clangateway composition (Nix render layer), specifically the VM/full-install divergence betweenvmguest.goandenrollment.go/gateway_attach.go.What plugging it needs: extend the
ledger.nixpattern to the rest of the gateway service surface — extractsystemd.services.ourcloud-control-plane,services.kanidm+ its two generators,ourcloud-self-trust,idpLoopbackBridge, the kanidm brand-push blocks, andgatewayAssertions()out ofrenderGatewayGuestinto a moduleAttachGatewaywrites/imports on every gateway (VM and full-install alike), keeping only host-baseline concerns (boot/network/qemu-guest profile) in the VM-onlyrenderVMGuestBaseline/renderGatewayGuest. Needs a seam test at the composed OWN-VPS assembly (front door + acme-dns, nogateway-guest.nix) asserting the control-plane unit is present, matchingTestAttachGateway_LedgerHomeReachesOwnVPSGateway's shape (gateway_attach_test.go). This is a multi-file, design-bearing extraction (how the new module coexists with full-install'snetworking.nix/disko.nix/platform.nix/access.nix, and avoiding duplicate-attrpath collisions on the VM path once the inline definition is removed fromvmguest.go) — out of scope for a healer self-fix. Advances #378.drive
20260811T204058Zred atfinish: `[Nmexpect([Nm[Nmlocator[Nm[Nm).[NmtoHaveCount[Nm([Nm[Nmexpected[Nm[Nm)[Nm failedLocator: locator('[data-status="journey-fault"]')
Expected: [NmN[Nm
Received: [NmN[Nm
Timeout: Nms
Call log:
[Nm - Expect "toHaveCount" with timeout Nms[Nm
[Nm - waiting for locator('[data-status="journey-fault"]')[Nm
[Nm N × locator resolved to N element[Nm
[Nm - unexpected value "N"[Nm
evidence:test-results/…/20260811T204058Z/` on matou-workstation (legs.json, droplet-journal.txt, trace)RULED (Ben, 2026-08-11): STRUCTURAL fix — full-install emits the baseline — + fold in the deploy real-check
This is the 6th recurrence of GOTCHAS #12 (full-install bakes no baseline): the own-VPS FullInstall assembles
machines/gateway/*.nixpiecemeal and never emitsgateway-guest.nix(renderGatewayGuest, vmguest.go), so every capability that baseline carries has been re-ported one at a time — hostPlatform (#399), SSH identity (#410), trust (#432), loopback target (#436), ledger dir (#442), and nowourcloud-control-plane.serviceitself (vmguest.go:264). Stop porting pieces.Do NOT just add the one service. Make the own-VPS FullInstall path emit the gateway baseline — the cleanest shape: have the FullInstall configure stage write
gateway-guest.nix(viarenderGatewayGuest, the same render VM mode uses) into the machine dir and import it fromconfiguration.nix, so the WHOLE baseline (control-plane service + whatever else it declares) crosses in one piece and this divergence stops generating teeth. Reconcile against what the FullInstall path already renders separately (front-door.nix, acme-dns.nix, kanidm in front-door, networking/disko/platform, ledger.nix from #442) so nothing double-declares — where the baseline and a standalone module overlap, one must win (the strip-line precedent renderGatewayGuest already uses for the VM baseline's allowedTCPPorts is the pattern). The acceptance bar: the own-VPS gateway's rendered config carriesourcloud-control-plane.service, and a seam test asserts the FULL-INSTALL assembly (not just gateway-guest.nix) contains it — the assertion that would have caught all six.Fold in the deploy real-check (Ben):
internal/founding/deploy.go's "the control plane is live" comes fromcontrolPlaneComponents(), a STATIC label list — it never checks the unit is running, which is exactly why a gateway with no control-plane service still logged "live" and the gap hid until the finish-leg restart. The deploy leg must verifyourcloud-control-plane.serviceis actuallyactive(systemctl is-active over the clan connection) before logging live / advancing — a real probe, fail-loud (ADR 0100), not a fabricated success. Add GOTCHAS #12 a line noting the control-plane service was the 6th port and the baseline-emit is the structural close.Scope is bigger than a one-liner but convergent — after this, the own-VPS gateway IS a gateway, not a hand-assembled subset. Stays priority/ready-for-agent.
Landed on
origin/mainas56875af(sandcastle: #443 …).Structural close (Ben's ruling), not a 7th port. The own-VPS full-install gateway now EMITS the control-plane surface as its own module
control-plane.nix(renderControlPlaneSurface,internal/clan/vmguest.go): theourcloud-control-planeunit +ourcloud-self-trust+ the kanidm-tls/kanidm-admins generators + the/etcsecret pointers.writeNodeConfig's full-install branch bakes it andAttachGatewayimports it viabaseMachineModules— the same composition point as #442'sledger.nix. The VM path keeps the whole surface inline (renderGatewayGuestis proven byte-identical — a pure extraction into shared block helpers), so it never double-imports.It deliberately omits what the full-install gateway gets elsewhere so nothing double-declares:
services.kanidm(front-door.nix owns the public kanidm — originid.<apex>, bound behind Caddy), the host baseline (networking/disko/platform/access), and the VM-only idp bridge / brand / build-time assertions. The generators here DECLARE the sealed paths front-door's kanidm already references at/run/secrets/vars/kanidm-tls— completing the public kanidm, not colliding.Deploy real-check folded in.
clan.UnitActiveprobessystemctl is-active ourcloud-control-plane.serviceover the clan connection;internal/founding/deploy.goruns it before reporting the control plane live and fails loud otherwise (ADR 0100) — the static-label fabricated "live" can never recur.Verification.
TestAttachGateway_ControlPlaneReachesOwnVPSGatewaypins the unit against the FULL-INSTALL assembly (the assertion that would have caught all six ports).TestOwnVPSGateway_EvalSmokenow bakes + evaluatescontrol-plane.nixunder real nix — passed, no double-declaration (drvPath7lf9vdg…).TestDeploy_FailsLoudWhenControlPlaneNotRunningproves the probe. drvPath baseline re-recorded; theseed-community/fleetgwrow also moved — an incidental clan-core lock advance the smoke re-locked (render proven byte-identical), noted in the commit. GOTCHAS #12 carries the 6th-port + structural-close note. Advances #378.