enroll-configure red: own-VPS gateway seed sets no nixpkgs.hostPlatform — the node's config cannot evaluate #399

Closed
opened 2026-08-10 15:51:52 +00:00 by ben · 1 comment
Owner

Failure

Drive 20260810T154053Z (built at f989696, so #398's vars fix was in): the own-VPS journey again went red at enroll-configure, but one sub-step further than #398 — vars now generate, and the stand-up faults at the eval preflight: founding: the server stand-up did not complete (status "blocked"): the node's config does not evaluate.

Diagnosis (reproduced by hand)

Running the exact preflight against the run's captured flake (state/clan-config):

$ nix eval .#nixosConfigurations.gateway.config.system.build.toplevel.drvPath
error: Neither nixpkgs.hostPlatform nor the legacy option nixpkgs.system has been set.

The local-guest path never hits this because its VM template sets the platform (internal/clan/vmguest.go:31: nixpkgs.hostPlatform = "x86_64-linux";). The own-VPS carrier's seeded gateway (machines/gateway/{configuration,disko,networking,acme-dns,front-door}.nix) sets no hostPlatform anywhere — the droplet path doesn't use the vmguest template and nothing else supplies it.

Fix

The own-VPS gateway seed must set nixpkgs.hostPlatform (x86_64-linux for DO droplets; derive from the target's arch if the carrier already probes it — keep it honest rather than hardcoding if the probe exists). Mirror the vmguest precedent. A seam test asserting the seeded gateway evaluates (nix eval …toplevel.drvPath on a freshly-seeded flake) would have caught this before a paid drive and covers the whole class.

drive 20260810T154053Z red at wizard: drive red at wizard — the wizard died before any leg ran
evidence: test-results/…/20260810T154053Z/ on matou-workstation (legs.json, droplet-journal.txt, trace); captured flake in …/state/clan-config

## Failure Drive `20260810T154053Z` (built at `f989696`, so #398's vars fix was in): the own-VPS journey again went red at **enroll-configure**, but one sub-step further than #398 — vars now generate, and the stand-up faults at the **eval preflight**: `founding: the server stand-up did not complete (status "blocked"): the node's config does not evaluate`. ## Diagnosis (reproduced by hand) Running the exact preflight against the run's captured flake (`state/clan-config`): ``` $ nix eval .#nixosConfigurations.gateway.config.system.build.toplevel.drvPath error: Neither nixpkgs.hostPlatform nor the legacy option nixpkgs.system has been set. ``` The local-guest path never hits this because its VM template sets the platform (`internal/clan/vmguest.go:31`: `nixpkgs.hostPlatform = "x86_64-linux";`). The own-VPS carrier's seeded gateway (`machines/gateway/{configuration,disko,networking,acme-dns,front-door}.nix`) sets **no hostPlatform anywhere** — the droplet path doesn't use the vmguest template and nothing else supplies it. ## Fix The own-VPS gateway seed must set `nixpkgs.hostPlatform` (x86_64-linux for DO droplets; derive from the target's arch if the carrier already probes it — keep it honest rather than hardcoding if the probe exists). Mirror the vmguest precedent. A seam test asserting the seeded gateway evaluates (`nix eval …toplevel.drvPath` on a freshly-seeded flake) would have caught this before a paid drive and covers the whole class. drive `20260810T154053Z` red at `wizard`: `drive red at wizard — the wizard died before any leg ran` evidence: `test-results/…/20260810T154053Z/` on matou-workstation (legs.json, droplet-journal.txt, trace); captured flake in `…/state/clan-config` <!-- rehearsal-sig: dcf630511b50 -->
ben changed title from rehearsal drive red at wizard to enroll-configure red: own-VPS gateway seed sets no nixpkgs.hostPlatform — the node's config cannot evaluate 2026-08-10 16:01:53 +00:00
Author
Owner

Fixed in eabd46b (on origin/main).

Root cause: the own-VPS FullInstall bakes networking.nix/disko.nix and NO guest baseline, so nixpkgs.hostPlatform was set nowhere — the VM path only escapes this because vmguest.go sets it in the guest baseline. The eval preflight faulted "Neither nixpkgs.hostPlatform nor the legacy option nixpkgs.system has been set".

Fix (mirrors the vmguest precedent): the clan seam now bakes a platform.nix (nixpkgs.hostPlatform) for every full install, added to baseMachineModules so AttachGateway imports it into the gateway's configuration.nix during the configure stage — ahead of the preflight eval. The platform is derived from the connect probe's arch-os (installOwnVPS -> EnrollRequest.Platform -> carrierHostPlatform), honest per ADR 0100: an incomplete probe falls back to the DO droplet x86_64-linux rather than fabricating one.

Seam tests covering the class: full-install enroll asserts a baked hostPlatform + honours a probed aarch64-linux; carrierHostPlatform unit-tests the probe->double derivation and its empty-probe guard; the own-VPS integration test asserts req.Platform == x86_64-linux. Frontier moves past enroll-configure toward supply/pair.

Fixed in eabd46b (on origin/main). Root cause: the own-VPS FullInstall bakes `networking.nix`/`disko.nix` and NO guest baseline, so `nixpkgs.hostPlatform` was set nowhere — the VM path only escapes this because `vmguest.go` sets it in the guest baseline. The eval preflight faulted "Neither nixpkgs.hostPlatform nor the legacy option nixpkgs.system has been set". Fix (mirrors the vmguest precedent): the clan seam now bakes a `platform.nix` (`nixpkgs.hostPlatform`) for every full install, added to `baseMachineModules` so `AttachGateway` imports it into the gateway's `configuration.nix` during the configure stage — ahead of the preflight eval. The platform is derived from the connect probe's arch-os (`installOwnVPS` -> `EnrollRequest.Platform` -> `carrierHostPlatform`), honest per ADR 0100: an incomplete probe falls back to the DO droplet `x86_64-linux` rather than fabricating one. Seam tests covering the class: full-install enroll asserts a baked hostPlatform + honours a probed `aarch64-linux`; `carrierHostPlatform` unit-tests the probe->double derivation and its empty-probe guard; the own-VPS integration test asserts `req.Platform == x86_64-linux`. Frontier moves past enroll-configure toward supply/pair.
ben closed this issue 2026-08-10 16:14:40 +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#399
No description provided.