agent-install (device-vm): nothing fills the executor payload's vm-guest.tar slot — a VM-mode device drive cannot pass the leg #1186

Closed
opened 2026-09-03 15:18:24 +00:00 by matou-build-agent · 1 comment

The failure

Drive 20260903T144614Z (--target device-vm, sig f719667ae384) drove 21 green legs on a rented droplet and redded at agent-install:

the community gateway serves no device VM-guest bundle (/get?artifact=vm-guest exited 22)
curl: (22) The requested URL returned error: 503

Evidence

The gateway was right to 503. The chain, in order:

  • app/tests/e2e/journey.device.spec.ts:579-595 — vm mode HEADs the doorway (guestPayloadProbeCommand, app/tests/e2e/fixtures/deviceAdd.ts:574-576) and reds on any non-200. Correct as written.
  • internal/controlapi/install_doorway.go:133-136 — serveGuestPayload 503s vm_guest_unavailable when the source errors (a nil source would 404, so the route IS wired; the fetch failed).
  • internal/install/guestcache.go:58-61 — the source opens <agent-cache>/x86_64/vm-guest.tar. That file is not on the gateway.
  • internal/fleetwire/supply.go:334-339 — seedGuestPayload returns early, logging, when $IDSS_PAYLOAD_DIR/vm-guest.tar is absent. Best-effort by design (the installer-base pattern), so the supply leg stayed green.
  • The payload itself: artifacts/host.json names payloadMode: /home/swarm/swarm/rehearsal-payload. Its contents are agent, control-plane, idss-idp, dashboard/, installer-base-cache/, installer-base.toplevel — no vm-guest.tar, no nixos-guest.qcow2, no QEMU dist, no PAYLOAD.txt. It was hand-assembled for the droplet/rented/device-full targets and has never carried a VM slot.
  • scripts/rehearsal-cycle.sh:288-329 (stage_and_preflight) refreshes control-plane, idss-idp, agent, dashboard, keri-web and the installer-base cache before every drive. It never stages the vm-guest slot.

(Operator-side fleetwire logging is absent from the run dir — logs/helper.log is 0 bytes — but the payload directory is direct evidence, and its mtimes (14:46-14:47, drive fired 14:46:14) confirm it is the payload this drive staged.)

Suspected layer

Executor payload staging. scripts/assemble-payload.sh:263-301 already builds the vm-guest.tar slot correctly (it tars nixos-guest.qcow2 + the relocatable QEMU dist when both are staged, else records PENDING). Task 2 of #1153 landed everywhere it needed to — seed, doorway, cache source. What is missing is the step that puts those two inputs on the executor host and keeps the tar fresh.

What to do

Mirror the existing best-effort, staleness-keyed pattern (installer_base_refresh_cache, scripts/lib/installer-base-staleness-lib.sh, called at rehearsal-cycle.sh:328):

  1. A scripts/lib/vm-guest-staleness-lib.sh that builds .#packages.x86_64-linux.pinned-qemu (scripts/build-qemu-payload.sh) and .#packages.x86_64-linux.guest-image (scripts/build-guest-image.sh), stages both into $IDSS_PAYLOAD_DIR, and tars the vm_guest_members list from assemble-payload.sh:281 into $IDSS_PAYLOAD_DIR/vm-guest.tar — keyed so a current slot is a no-op.
  2. Call it from stage_and_preflight, for the device target only (a droplet/rented/idip drive must not grow the cost).
  3. Record the added fixed cost (build wall-clock + payload bytes) per the arc-start fixed-cost rule — this is the one artefact large enough to matter, and the qcow2 build is not cheap.

Until then the drive parks free at second 0: this heal's gate (scripts/smoke-private-path.sh, commit 2eca397f) refuses a vm-mode device drive whose payload has no vm-guest.tar, and docs/operator-app/rehearsal-drive.md records the manual per-host fill as the interim remedy. A vm-mode device drive cannot reach a green agent-install until the slot is filled — the drive should stay blocked on this issue.

Advances #1153 (task 2 / task 9).

drive 20260903T144614Z red at agent-install: the community gateway serves no device VM-guest bundle (/get?artifact=vm-guest exited 22) — a VM-mode Create would fail loud for want of a staged guest image (Task 2 of #1153, ADR 0100): Warning: Pe
evidence: /home/swarm/swarm/Matou/idss/test-results/drive-device/20260903T144614Z on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured

## The failure Drive `20260903T144614Z` (`--target device-vm`, sig `f719667ae384`) drove 21 green legs on a rented droplet and redded at `agent-install`: ``` the community gateway serves no device VM-guest bundle (/get?artifact=vm-guest exited 22) curl: (22) The requested URL returned error: 503 ``` ## Evidence The gateway was right to 503. The chain, in order: - `app/tests/e2e/journey.device.spec.ts:579-595` — vm mode HEADs the doorway (`guestPayloadProbeCommand`, `app/tests/e2e/fixtures/deviceAdd.ts:574-576`) and reds on any non-200. Correct as written. - `internal/controlapi/install_doorway.go:133-136` — `serveGuestPayload` 503s `vm_guest_unavailable` when the source errors (a *nil* source would 404, so the route IS wired; the fetch failed). - `internal/install/guestcache.go:58-61` — the source opens `<agent-cache>/x86_64/vm-guest.tar`. That file is not on the gateway. - `internal/fleetwire/supply.go:334-339` — `seedGuestPayload` returns early, logging, when `$IDSS_PAYLOAD_DIR/vm-guest.tar` is absent. Best-effort **by design** (the installer-base pattern), so the `supply` leg stayed green. - **The payload itself**: `artifacts/host.json` names `payloadMode: /home/swarm/swarm/rehearsal-payload`. Its contents are `agent`, `control-plane`, `idss-idp`, `dashboard/`, `installer-base-cache/`, `installer-base.toplevel` — **no `vm-guest.tar`, no `nixos-guest.qcow2`, no QEMU dist, no `PAYLOAD.txt`**. It was hand-assembled for the droplet/rented/device-full targets and has never carried a VM slot. - `scripts/rehearsal-cycle.sh:288-329` (`stage_and_preflight`) refreshes control-plane, idss-idp, agent, dashboard, keri-web and the installer-base cache before every drive. **It never stages the vm-guest slot.** (Operator-side fleetwire logging is absent from the run dir — `logs/helper.log` is 0 bytes — but the payload directory is direct evidence, and its mtimes (14:46-14:47, drive fired 14:46:14) confirm it is the payload this drive staged.) ## Suspected layer Executor payload staging. `scripts/assemble-payload.sh:263-301` already builds the `vm-guest.tar` slot correctly (it tars `nixos-guest.qcow2` + the relocatable QEMU dist when both are staged, else records PENDING). Task 2 of #1153 landed everywhere it needed to — seed, doorway, cache source. What is missing is the step that puts those two inputs on the executor host and keeps the tar fresh. ## What to do Mirror the existing best-effort, staleness-keyed pattern (`installer_base_refresh_cache`, `scripts/lib/installer-base-staleness-lib.sh`, called at `rehearsal-cycle.sh:328`): 1. A `scripts/lib/vm-guest-staleness-lib.sh` that builds `.#packages.x86_64-linux.pinned-qemu` (`scripts/build-qemu-payload.sh`) and `.#packages.x86_64-linux.guest-image` (`scripts/build-guest-image.sh`), stages both into `$IDSS_PAYLOAD_DIR`, and tars the `vm_guest_members` list from `assemble-payload.sh:281` into `$IDSS_PAYLOAD_DIR/vm-guest.tar` — keyed so a current slot is a no-op. 2. Call it from `stage_and_preflight`, **for the device target only** (a `droplet`/`rented`/`idip` drive must not grow the cost). 3. Record the added fixed cost (build wall-clock + payload bytes) per the arc-start fixed-cost rule — this is the one artefact large enough to matter, and the qcow2 build is not cheap. Until then the drive parks free at second 0: this heal's gate (`scripts/smoke-private-path.sh`, commit `2eca397f`) refuses a vm-mode device drive whose payload has no `vm-guest.tar`, and `docs/operator-app/rehearsal-drive.md` records the manual per-host fill as the interim remedy. **A vm-mode device drive cannot reach a green `agent-install` until the slot is filled — the drive should stay blocked on this issue.** Advances #1153 (task 2 / task 9). drive `20260903T144614Z` red at `agent-install`: `the community gateway serves no device VM-guest bundle (/get?artifact=vm-guest exited 22) — a VM-mode Create would fail loud for want of a staged guest image (Task 2 of #1153, ADR 0100): Warning: Pe` evidence: `/home/swarm/swarm/Matou/idss/test-results/drive-device/20260903T144614Z` on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured <!-- rehearsal-sig: f719667ae384 -->
Owner

Filled and staged — closing; the drive re-fires on this close.

Three landings close the residual:

  • 4ff70f1b — scripts/stage-vm-guest-slot.sh + presence-keyed cycle hook: the standing payload's slot is now the cycle's business (5-check offline suite incl. the member-list drift pin against assemble-payload.sh).
  • eef024dc — staging surfaced that #1159's guest config wrote services.netbird.clients against the flake's nixos-24.11 pin (option absent — the image stopped EVALUATING; the eval gate's scope never covered nix/guest). The image now speaks the pin's tunnels."wt0" dialect with stateDir netbird-mesh + a netbird-mesh CLI shim, so the land-time join's state/socket/CLI are byte-identical to the deployed clients dialect and the login survives the first machines update.
  • The healer's e7dccf9d second-0 gate stands as the backstop should the stage ever fail.

Staged evidence (elitebook-03, 15:26Z): vm-guest.tar 2,597,109,760 bytes in $IDSS_PAYLOAD_DIR; the built guest toplevel drv 4hpbydmh…-nixos-system-idss-guest is byte-identical to the drvPath the fixed config evaluates to (probed against the pin before building). Standing home wiped, so the re-drive RE-FOUNDS and supply carries the slot — an adopt would have kept serving the slotless cache.

Follow-up (will file): the guest flake output joins the eval gate's offline scope, so a dialect break like #1159's reds free next time.

**Filled and staged — closing; the drive re-fires on this close.** Three landings close the residual: - `4ff70f1b` — `scripts/stage-vm-guest-slot.sh` + presence-keyed cycle hook: the standing payload's slot is now the cycle's business (5-check offline suite incl. the member-list drift pin against assemble-payload.sh). - `eef024dc` — staging surfaced that #1159's guest config wrote `services.netbird.clients` against the flake's nixos-24.11 pin (option absent — the image stopped EVALUATING; the eval gate's scope never covered nix/guest). The image now speaks the pin's `tunnels."wt0"` dialect with `stateDir netbird-mesh` + a `netbird-mesh` CLI shim, so the land-time join's state/socket/CLI are byte-identical to the deployed `clients` dialect and the login survives the first `machines update`. - The healer's `e7dccf9d` second-0 gate stands as the backstop should the stage ever fail. **Staged evidence (elitebook-03, 15:26Z):** `vm-guest.tar` 2,597,109,760 bytes in `$IDSS_PAYLOAD_DIR`; the built guest toplevel drv `4hpbydmh…-nixos-system-idss-guest` is byte-identical to the drvPath the fixed config evaluates to (probed against the pin before building). Standing home wiped, so the re-drive RE-FOUNDS and `supply` carries the slot — an adopt would have kept serving the slotless cache. Follow-up (will file): the guest flake output joins the eval gate's offline scope, so a dialect break like #1159's reds free next time.
ben closed this issue 2026-09-03 15:27:14 +00:00
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.

Reference
Matou/idss#1186
No description provided.