device-add: a COLD VM-mode install can never create the guest — the VM manager resolves the staged slot before StageGuest fills it (BaseImage ""); drives hide it by running the one-liner twice #2004
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#2004
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?
Symptom
A VM-mode join on a machine that has never had the agent always fails at guest Create, even though the guest bundle was downloaded and unpacked correctly:
bens-mac-04joining Whakatōhea Demo by hand, 2026-09-30./var/lib/idss/vm-guest/nixos-guest.qcow2(2.2 GB) landed at 00:51:43Z; the create failed at 00:51:51Z looking for an image at the empty path.Cause
Order of operations in the install command.
runInstall(agent/cmd/agent/main.go:622) callsjoinAdapters()first, which builds the VM manager withvm.NewResolvedWithGuestKey→vm.ResolveConfig()(internal/vm/resolve.go:81).ResolveConfigreadsstagedGuestSlot()at that moment: on a cold machine the slot does not exist yet, soBaseImageresolves to"". Only later doesjoin.RunInstallCommand→InstallAgent→StageGuest(internal/join/cli.go:102) download and unpack the slot. The manager never looks again.The same stale resolution sits in the standing
idss-agent joinservice, started by the service installer (00:37:36Z) before the slot existed — its manager also carriesBaseImage=""until the service restarts.Every drive missed this because the byo/device drives run the one-liner in an
agent-installleg and then run it again injoin— by then the slot exists andResolveConfigfinds it (ADR 0264 fires 6–8). A single cold run has never worked.Fix
ResolveConfigre-reads the staged slot whenBaseImageis empty (the cheapest fix —Manager.CreatecallsstagedGuestSlot()again beforemissingPayload), or the install command builds the VM manager afterInstallAgentreturns.device-vm-byotarget running the one-liner once on a clean machine (today's double run hides the defect — make the second run a red).Workaround (for the hand run)
Re-run the install (re-downloads, see the silent-download ticket) — or
sudo systemctl restart idss-agentandsudo IDSS_COMMUNITY_ORIGIN=<apex> idss-agent enroll <code>, which skips the stage and resolves the slot that is now present.Siblings
Found in the one hand run (bens-mac-04 → Whakatōhea Demo, 2026-09-30): #2002 #2003 #2005 #2006 #2007
swarm-claim host=matou-dev-server-01 run=36142
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #2004 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope