provision: NO service can deploy to a VM-mode member device — the config repo holds no machine configuration for the guest (no hostPlatform), so every deploy dies at eval #2024

Closed
opened 2026-09-30 05:52:29 +00:00 by ben · 2 comments
Owner

Symptom

A service deploy to a VM-mode member device fails at evaluation. It has never succeeded. Whakatōhea Demo, 2026-09-30 05:51Z, node-req-0003 (bens-mac-04's guest, Helper), Backup copy, on release 2026.09.3124 (after #2018):

commit-config=done seed-closures=done deploy-services=failed
provision: deploy node-req-0003: clan: config_eval on node-req-0003: the node was excluded at the eval preflight — nothing was deployed: error: Neither nixpkgs.hostPlatform nor the legacy option nixpkgs.system has been set.

The machine directory in the config repo holds only the service marker:

machines/node-req-0003/
└── backup-copy.nix        # no configuration.nix, no platform/networking/disko/access, no mesh.nix

Cause

The community's config repo has no machine configuration for a VM-mode member at all:

  • enrollment.go:886: if s.Install != FullInstall { return // VM-mode: no disk takeover; the join lands at verify. } The base host files (baseMemberModules: networking, disko, platform, access, mesh) are baked by writeNodeConfig only on a full-install member takeover.
  • ComposeMemberModules (member_attach.go:65) imports only files present on disk, so for a VM guest it composes an entry module with no platform, or none at all.
  • The founding's VM gateway guest has a composition (vmguest.go renderVMGuestBaseline + VMMode), but no member-role sibling exists.

The guest is booted from the pinned nix/guest image. The fleet's config repo carries nothing that describes it, so clan cannot evaluate or deploy to it.

Nothing exercised this before: ADR 0264 fire 8 redded at deploy-services on a clan.lol outage before evaluation, and the provision seams use the clan fake.

Fix

  • At a VM-mode member's landing (or at first provision), write the member-guest baseline into machines/<node>/: the same host shape the guest image boots (nix/guest/configuration.nix: platform x86_64-linux, the guest disk/boot layout, access with the enroll-trust key + fleet SSH CA, the member mesh module). This is the member-role sibling of renderVMGuestBaseline, never gateway-only files. Then compose configuration.nix over it plus placed service modules via ComposeMemberModules.
  • Deploy to it with VMMode semantics (a single clan machines update, no kexec/disko, never a reboot), as the gateway guest does.
  • A test that evaluates the REAL composed member-guest config (not the fake): clan select/nix eval of nixosConfigurations.<node> succeeds with no services placed and with backup-copy and code placed.
  • Extend the device-vm-byo drive past deploy-services to health-checks green.

#2018 / #2023 (backup-copy phantom instance), #2017, DDR 0293 (#2022). ADR 0223 (VM-mode member guest), ADR 0210 (member composition), ADR 0264.

## Symptom A service deploy to a **VM-mode member device** fails at evaluation. It has never succeeded. Whakatōhea Demo, 2026-09-30 05:51Z, `node-req-0003` (bens-mac-04's guest, Helper), Backup copy, on release `2026.09.3124` (after #2018): ``` commit-config=done seed-closures=done deploy-services=failed provision: deploy node-req-0003: clan: config_eval on node-req-0003: the node was excluded at the eval preflight — nothing was deployed: error: Neither nixpkgs.hostPlatform nor the legacy option nixpkgs.system has been set. ``` The machine directory in the config repo holds only the service marker: ``` machines/node-req-0003/ └── backup-copy.nix # no configuration.nix, no platform/networking/disko/access, no mesh.nix ``` ## Cause The community's config repo has **no machine configuration for a VM-mode member at all**: - `enrollment.go:886`: `if s.Install != FullInstall { return // VM-mode: no disk takeover; the join lands at verify. }` The base host files (`baseMemberModules`: networking, disko, platform, access, mesh) are baked by `writeNodeConfig` only on a full-install member takeover. - `ComposeMemberModules` (`member_attach.go:65`) imports only files present on disk, so for a VM guest it composes an entry module with no platform, or none at all. - The founding's VM **gateway** guest has a composition (`vmguest.go` `renderVMGuestBaseline` + VMMode), but no member-role sibling exists. The guest is booted from the pinned `nix/guest` image. The fleet's config repo carries nothing that describes it, so clan cannot evaluate or deploy to it. Nothing exercised this before: ADR 0264 fire 8 redded at `deploy-services` on a clan.lol outage before evaluation, and the provision seams use the clan fake. ## Fix - At a VM-mode member's landing (or at first provision), write the member-guest baseline into `machines/<node>/`: the same host shape the guest image boots (`nix/guest/configuration.nix`: platform `x86_64-linux`, the guest disk/boot layout, access with the enroll-trust key + fleet SSH CA, the member mesh module). This is the member-role sibling of `renderVMGuestBaseline`, never gateway-only files. Then compose `configuration.nix` over it plus placed service modules via `ComposeMemberModules`. - Deploy to it with VMMode semantics (a single `clan machines update`, no kexec/disko, never a reboot), as the gateway guest does. - A test that evaluates the REAL composed member-guest config (not the fake): `clan select`/`nix eval` of `nixosConfigurations.<node>` succeeds with no services placed and with `backup-copy` and `code` placed. - Extend the `device-vm-byo` drive past `deploy-services` to health-checks green. ## Related #2018 / #2023 (backup-copy phantom instance), #2017, DDR 0293 (#2022). ADR 0223 (VM-mode member guest), ADR 0210 (member composition), ADR 0264.

swarm-claim host=matou-dev-server-01 run=36341
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=matou-dev-server-01 run=36341 (automated multi-host claim — lowest live claim id works this ticket)

close-report for #2024 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 2024,
  "status": "success",
  "commits": [
    "af76951c0735a3fe36a06636a0614afcb9e04b47"
  ],
  "changed_files": [
    "STATUS.md",
    "docs/GOTCHAS.md",
    "internal/clan/memberguest_eval_test.go",
    "internal/provision/deploy.go",
    "internal/provision/deploy_test.go"
  ],
  "tests": [
    {
      "command": "go test ./internal/clan/ ./internal/provision/",
      "exit_code": 0
    },
    {
      "command": "go vet ./internal/clan/ ./internal/provision/",
      "exit_code": 0
    },
    {
      "command": "IDSS_EVAL_SMOKE=1 go test ./internal/clan/ -run TestMemberGuest_EvalSmoke -timeout 40m",
      "exit_code": 0
    },
    {
      "command": "go build ./internal/... ./control-plane/...",
      "exit_code": 0
    }
  ],
  "criteria": {
    "At a VM-mode member's landing/first provision, write the member-guest baseline into machines/<node>/ and compose configuration.nix over it plus placed service modules": "internal/provision/deploy.go — deployServicesOnly's StepCommitConfig now, for a VM-mode member device (not gateway, not a full offboard), always composes the member-guest baseline via ComposeVMGuestModules(node, memberModuleFilesFromSet(nodeSvcs)), landing guest-baseline.nix (=renderVMGuestBaseline, the member-role sibling — never gateway-only files) + configuration.nix importing it beside every placed routable service module. Proven by TestDeploy_VMGuestBackupCopyComposesTheBaseline (renderless-only VM member composes the guest baseline once, never ComposeMemberModules).",
    "Deploy to it with VMMode semantics (a single clan machines update, no kexec/disko, never a reboot), as the gateway guest does": "Already satisfied — applyRevision drives clan.Deploy (a single machines update, RestartChanged); kexec/disko/reboot live only in the enrollment install stage, which returns early for Install != FullInstall (enrollment.go:886) and is not run by the provision deploy path. No deploy-path change needed; documented at the new deploy.go block and STATUS/GOTCHAS #383. Pinned by TestDeploy_VMModeDrivesClanDeployServicesOnlyNeverEnroll (VM deploy never touches clan.Enroll).",
    "A test that evaluates the REAL composed member-guest config (nix eval succeeds with no services placed and with backup-copy [and code] placed)": "internal/clan/memberguest_eval_test.go TestMemberGuest_EvalSmoke — ran GREEN over a real nix (IDSS_EVAL_SMOKE=1, 4 legs, 64.5s): (1) no services -> real toplevel drvPath; (2) the backup-copy renderless marker placed (the exact node-req-0003 shape) -> real drvPath, IDENTICAL to (1), proving the marker is inert; (3) a real imported service module (files.nix — SUBSTITUTED for 'code', which is gateway-colocated and cannot be placed on a member device today, provisionCannotDeploy('code')==true) -> real drvPath; (4) TEETH: a takeover-shape twin FAILS eval with the drive's own hostPlatform sentence.",
    "Extend the device-vm-byo drive past deploy-services to health-checks green": "OWED (a live drive leg, out of this seam's reach) — noted in STATUS.md and the close as the sibling frontier. The seam fix and the REAL composed-config eval are proven here; the live guest health-check leg waits on a rehearsal drive."
  },
  "summary": "A VM-mode member device now composes its member-guest baseline (guest-baseline.nix + configuration.nix) at provision, so a service deploy no longer dies at the eval preflight with no hostPlatform.",
  "blockers": [],
  "unproven_by_seam": "The provision seam tests use the clan fake (they prove ComposeVMGuestModules is CALLED); the REAL composed guest config is proven to evaluate by TestMemberGuest_EvalSmoke over a real nix, but the LIVE leg — the actual guest coming back green through deploy-services + health-checks on a real device-vm-byo drive — is owed."
}
**close-report** for #2024 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 2024, "status": "success", "commits": [ "af76951c0735a3fe36a06636a0614afcb9e04b47" ], "changed_files": [ "STATUS.md", "docs/GOTCHAS.md", "internal/clan/memberguest_eval_test.go", "internal/provision/deploy.go", "internal/provision/deploy_test.go" ], "tests": [ { "command": "go test ./internal/clan/ ./internal/provision/", "exit_code": 0 }, { "command": "go vet ./internal/clan/ ./internal/provision/", "exit_code": 0 }, { "command": "IDSS_EVAL_SMOKE=1 go test ./internal/clan/ -run TestMemberGuest_EvalSmoke -timeout 40m", "exit_code": 0 }, { "command": "go build ./internal/... ./control-plane/...", "exit_code": 0 } ], "criteria": { "At a VM-mode member's landing/first provision, write the member-guest baseline into machines/<node>/ and compose configuration.nix over it plus placed service modules": "internal/provision/deploy.go — deployServicesOnly's StepCommitConfig now, for a VM-mode member device (not gateway, not a full offboard), always composes the member-guest baseline via ComposeVMGuestModules(node, memberModuleFilesFromSet(nodeSvcs)), landing guest-baseline.nix (=renderVMGuestBaseline, the member-role sibling — never gateway-only files) + configuration.nix importing it beside every placed routable service module. Proven by TestDeploy_VMGuestBackupCopyComposesTheBaseline (renderless-only VM member composes the guest baseline once, never ComposeMemberModules).", "Deploy to it with VMMode semantics (a single clan machines update, no kexec/disko, never a reboot), as the gateway guest does": "Already satisfied — applyRevision drives clan.Deploy (a single machines update, RestartChanged); kexec/disko/reboot live only in the enrollment install stage, which returns early for Install != FullInstall (enrollment.go:886) and is not run by the provision deploy path. No deploy-path change needed; documented at the new deploy.go block and STATUS/GOTCHAS #383. Pinned by TestDeploy_VMModeDrivesClanDeployServicesOnlyNeverEnroll (VM deploy never touches clan.Enroll).", "A test that evaluates the REAL composed member-guest config (nix eval succeeds with no services placed and with backup-copy [and code] placed)": "internal/clan/memberguest_eval_test.go TestMemberGuest_EvalSmoke — ran GREEN over a real nix (IDSS_EVAL_SMOKE=1, 4 legs, 64.5s): (1) no services -> real toplevel drvPath; (2) the backup-copy renderless marker placed (the exact node-req-0003 shape) -> real drvPath, IDENTICAL to (1), proving the marker is inert; (3) a real imported service module (files.nix — SUBSTITUTED for 'code', which is gateway-colocated and cannot be placed on a member device today, provisionCannotDeploy('code')==true) -> real drvPath; (4) TEETH: a takeover-shape twin FAILS eval with the drive's own hostPlatform sentence.", "Extend the device-vm-byo drive past deploy-services to health-checks green": "OWED (a live drive leg, out of this seam's reach) — noted in STATUS.md and the close as the sibling frontier. The seam fix and the REAL composed-config eval are proven here; the live guest health-check leg waits on a rehearsal drive." }, "summary": "A VM-mode member device now composes its member-guest baseline (guest-baseline.nix + configuration.nix) at provision, so a service deploy no longer dies at the eval preflight with no hostPlatform.", "blockers": [], "unproven_by_seam": "The provision seam tests use the clan fake (they prove ComposeVMGuestModules is CALLED); the REAL composed guest config is proven to evaluate by TestMemberGuest_EvalSmoke over a real nix, but the LIVE leg — the actual guest coming back green through deploy-services + health-checks on a real device-vm-byo drive — is owed." } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#2024
No description provided.