deploy-services: the device deploy builds node-req-0003's system inside the 1 GB VM-mode guest, and the guest OOM-kills nix (sig db4e706c778c) #1215
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.
Blocks
Reference
Matou/idss#1215
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?
The failure
deploy-servicesred after 934 s (artifacts/legs.json,artifacts/verdict.json— 10 green, first reddeploy-services). The operator app surfaced the deploy's own fault frame ([data-field="deploy-failure"],data-status="clean-retry"):The classifier is right about the transport (
internal/clan/errors.go:221-227— exit 255 / the(exit code 255)wrapper read as connectivity) and wrong about the cause. ssh did not drop. The box answered a fresh connect seconds later —logs/device-do-forensics.txt: 0 % packet loss,tcp/22: a FRESH connect succeeded — the box answers, whatever ssh did, and DO recorded only thecreateaction on droplet 597754418 (no power_cycle/resize/migration).What actually happened: the guest OOM-killed nix, three times
logs/device-journal.txt:1521,1525,1529— the guest's serial console, relayed throughqemu-system-x86_64[9820]:Those are guest-kernel uptime stamps on a guest that booted ~11:14. The guest has 1024 MB:
logs/device-guest-unit.log—ExecStart=… -smp 1 -m 1024 …. nix dies at ~830 MB RSS, no swap.Host-side there was no pressure at all:
logs/device-stall.txt— droplet 7941 MB total / 1551 used / 6390 available, nothing in dmesg, andnix-daemon journal: -- No entries --. The droplet never built anything.logs/device-do-forensics.txtbandwidth agrees: ~40-53 Mbps inbound 11:16-11:22 (closure fetch into the guest), then flat ~0 from 11:24 while the guest sat CPU-bound building and dying.Three kills matches attempt +
updateNode's one sanctioned transport retry (internal/clan/adapter.go:640-644) + the app'sclean-retry— each re-ran the identical build in the same 1 GB box, which is why the leg burned 15.6 minutes of a paid droplet.Why the build ran inside the guest
internal/clan/adapter.go:626-645(updateNode) invokes:No
--build-host. The pinned clan-cli (internal/clan/toolpin.go:22, clan-core revd098fa2edd659544fc492d7be188d529bbc65af5) then falls back to the target —clan_lib/machines/update.py:589-590:and
machine.build_host()(clan_lib/machines/machines.py:122-135) returnsNoneunlessdeploy.buildHostis set in the inventory, which it is not for node-req-0003. The guest IS the mesh node (ADR 0223 —logs/device-guest-mesh-status.log, wt0 100.117.207.171), so the target host is the guest.The install leg pins the opposite (
internal/clan/enrollment.go:1774—"--build-on", "local"); the update/deploy leg pins nothing. That asymmetry is why founding greened on the 4 GB gateway droplet and the device deploy cannot green at all.Why the guest is 1 GB
The dedication is the helper role's catalogue floor, taken verbatim:
internal/catalogue/catalogue.go:427(static-sites) and:628(backup-copy) are bothfloor(1, 1, 10), andFloorFor(:694) picks the cheapest, sohelper→ 1 thread / 1 GB / 10 GB.internal/join/app.go:231-233—vmSpecFromFloordedicates exactly that floor to the guest.internal/vm/manager.go:1100-1113— the unit renders-smp <cores> -m <memMB>from it.artifacts/join-transcript.txtshows it as the person at the machine saw it:CPUs [1] Memory [1 GB] Disk [10 GB].The floor is sized for a service's steady footprint (
SteadyMemBytes: steadyMB(256)), not for the Nix build that has to run to put the service there. The phase-7 design already flagged the shape — "the live gate may wave a too-small host through and the guest then starves" (docs/superpowers/specs/2026-08-29-183-phase-7-vm-device-rehearsal-design.md:106-115).A second, separate defect the same evidence shows
internal/fleetstate/projection.go:278-283records a VM-mode device'sResourcesfrom the host probe:artifacts/join-transcript.txtshows the paired probe as4 threads · 7 GB memory · 153 GB disk— the droplet, not the 1 GB guest.DeviceView.Resources' own doc (internal/provision/assess.go:32-35) says a VM-mode device "counts its allocated resources", but only theAllocatedboolean is set; the numbers stay the host's. SodeviceReason(internal/provision/assess.go:424-435) measuredfiles(Nextcloud, floor(2, 4, 60),catalogue.go:305) against 7 GB and passed it, on a guest with 1 GB and 10 GB of disk. The probe has to be the host's forvmHostFloor's ADR 0030 arithmetic (internal/enroll/ledger.go:1038-1051); the projection re-reads the same field as capacity. Two meanings, one field.This did not by itself cause the red — gated rows are toggleable, never blocked (ADR 0015), so
select-fileswould have tickedfileseither way — but it means the spec gate is vacuous for every VM-mode device.Evidence absent
logs/broker-journal.txtharvested nothing (brokerdev@100.98.48.68off the admin mesh — by design, ADR 0208 / #681) andlogs/state-logs.logreports nostate/logsdirectory.logs/device-caddy.txtandlogs/device-keri.txtare empty/unit-not-found as expected — the device never got a system.state/clan-configholds only the standing gateway's repo (HEAD1908246a), not node-req-0003's, sodeploy.buildHostcould not be read back from the snapshot; it is inferred absent from clan-cli's fallback firing.Suspected layer
The clan deploy seam (
internal/clan/adapter.go) and the VM-mode sizing chain (catalogue→join→internal/vm). Not the harness: the drive's join answers are the offered defaults, and nothing inscripts/orapp/tests/e2e/overrides guest sizing.Refusal — rule 3 (product-behaviour surface)
Every honest fix changes what a deploy does or what a community sees, so the healer did not attempt one:
--build-host localhostinupdateNode, or adeploy.buildHostcarried through the render (internal/clan/render.go:41already carries the key). One line, but it changes where every node in every community builds, fleet-wide, and moves the load onto the 2 vCPU / 4 GB gateway plus a closure copy over the mesh. TheSupplyseam's own doc (internal/clan/clan.go:866-871) and ADR 0102 §5 put the target-closure cache deliberately outside this arc.internal/join/app.go:243-247,internal/join/cli.go:203-205) and the ADR 0030 host arithmetic that gates who may join at all.nix buildjobs/cores, innix/guest/configuration.nix— the guest OS image itself.A ruling is needed on which of (1)/(2)/(3) is the intended shape — and, separately, on whether the projection defect above is fixed by recording the guest's dedication or by carrying it as its own field — before anyone writes code. Hence
confident: false.drive
20260904T105814Zred atdeploy-services:deploy failed (clean-retry): provision: deploy node-req-0003: clan: deploy failed on 1 node(s): node-req-0003: clan: connectivity on node-req-0003: the remote build's ssh transport died (exit 255): [nevidence:
/home/swarm/swarm/Matou/idss/test-results/drive-device/20260904T105814Zon matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was capturedReviewed by agent (standing session) under ADR 0174. I verified the diagnosis against the tree and it holds; but the resolution needs a ruling that stops on the human, so I am routing this
ready-for-humanwith a concrete proposed default for each open decision (the ticket as filed asked for a ruling but carried none — ADR 0174 §4). No code landed.Diagnosis — confirmed in the tree
updateNode(internal/clan/adapter.go:626-645) invokesclan machines update … --host-key-check nonewith no--build-host, so the pinned clan-cli falls back to the target host — and the target IS the 1 GB guest (ADR 0223 mesh node). Confirmed.installArgs(internal/clan/enrollment.go:1774) passes--build-on local. The install/update asymmetry is real and is why founding greens on the 4 GB gateway and the device deploy cannot green.vmSpecFromFloor(internal/join/app.go:231-233) dedicates the role floor verbatim;FloorFor(internal/catalogue/catalogue.go:694) picks the cheapest → helper = 1/1/10. The floor sizes a service's steady footprint, not the Nix build that puts it there.internal/fleetstate/projection.go:278-283setsResourcesfrom the host probe and only flips theAllocatedbool; the doc (internal/provision/assess.go:33-35) says a VM-mode device "counts its allocated resources", but the numbers stay the host's. So the spec gate is vacuous for every VM-mode device. Real, but not the cause of the red.--build-host. TheSupplyseam explicitly acknowledges "target closures (via a build host or cache)" (internal/clan/clan.go:866-871), andrender.go:41already round-tripsdeploy.buildHost. So building off-target does not contradict an accepted decision — it still carries fleet-shape weight, but the door is not closed by ADR.Why human
Ben's ruling on the intended shape, plus the field-meaning modelling call. This is not
needs-design(the P4 flows/wireframes exist) — it is an engineering ruling with fleet-wide behaviour + trust-copy consequences, and its only real proof is a fresh device-deploy rehearsal drive (~15 min, paid droplet, 10-leg chain) that a one-shot standing session cannot start-and-verify without violating ADR 0174 §7 ("no later"). A seam test proves the flag is passed, not that the guest survives the build. Two-way in the reverse sense, but not cheaply provable here — so it stops on you with a default.Proposed default ruling A — the OOM shape (of 1/2/3): fix 1, scoped to VM-mode
Set
deploy.buildHostfor VM-mode nodes only at enrollment so the render carries it (render.go:41already does), building the guest's system on the control plane instead of inside the guest — mirroring the install leg's existing--build-on local. Rationale:join/app.go:243-247) — a trust surface — and tightens the ADR 0030 host-join arithmetic (who may join at all), permanently dedicating more of the member's machine to a VM to cover a transient build cost. Sizing steady-state hosting by peak-build memory is the wrong axis.nixjobs) treats the symptom and still runs the whole build in a 1-core guest. Reasonable as defence-in-depth, not the primary fix.Proposed default ruling B — the projection field: record the guest dedication in
Resources, carry the host probe as its own fieldDon't overload one field with two meanings.
vmHostFloor's ADR 0030 arithmetic (internal/enroll/ledger.go:1038-1051) legitimately needs the host numbers; the projection re-reads the same field as capacity. Give the host probe its own field for the arithmetic consumer and put the guest's dedicated spec intoResources— which matches the stated contract (assess.go:33-35) and makesdeviceReason(assess.go:424-435) measure services against the guest's real 1 GB/10 GB. Per ADR 0015 this newly blocks no one (gated rows are toggleable); it just makes the gate honest.Recommended follow-up (not filed — coupled to ruling A)
The classifier (
internal/clan/errors.go:220-227) reads exit 255 /(exit code 255)as connectivity. Here the cause was a guest OOM of the remote build, not a transport drop, so the app showedclean-retryand re-ran the identical build 3× (attempt +adapter.go:640-644retry + app retry), burning ~15.6 min of paid droplet. Distinguishing an OOM'd remote build from a genuine ssh drop is worth a follow-up, but only matters if ruling A does not land (fix 1 removes the in-guest build entirely). I left it as a note rather than filing a premature/duplicate issue.Left
ready-for-human; nothing committed. Veto or adopt either default at will.FIXED in
033c713f— both #1215 threads that block the drive, plus a third the same evidence exposed:updateNodenow pins--build-host localhost— the gateway control plane driving the CLI, which holds the community repo and the ADR 0133 warm store. The guest never builds its own system again, and member deploys stop re-fetching closures into the target (your bandwidth trace showed exactly that fetch). Your diagnosis was airtight — the install/update asymmetry was the whole story.device-guest-mesh-status.log: the 0.72 lockstep (f251e1f8) never reached the served image — the vm-guest slot is presence-keyed per member, so the forced re-stage re-tarred the OLD qcow2. The stage is now content-keyed on nix/guest + the flake pins (stale/keyless rebuilds the image, current fast no-ops, the cycle calls it unconditionally); elitebook's keyless payload rebuilds to 0.72.3 on the next tick unattended.The sizing question you raised (1 GB helper floor vs build headroom) is MOOT for builds now that they run on the gateway; whether the steady-state floor itself is right stays a catalogue question.
For the record, this drive also proved the #1210 stack live end-to-end: approve GREEN for the first time in VM mode, wt0 1/1 connected with 3/3 relays (rels:// advertised) through the whole deploy leg.
Ruled by session under ADR 0174 — veto anytime. Task 6 of #1153.
--substitute-on-destination(#699) never reachedmachines update#1764