own-VPS gateway deploy: control-plane preflight-skips the gateway node, and the real reason never reaches the operator #461
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
1 participant
Notifications
Due date
No due date set.
Blocks
Reference
Matou/idss#461
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?
Failure
Drive
20260812T010139Z(own-VPS rehearsal, real droplet) reds at thesupplyleg'swaitForLegpoll — the journey bar jumps todata-state="failed"/data-failed="control-plane"mid-poll (app/tests/e2e/fixtures/journey.ts:116;test-results/drive-droplet/20260812T010139Z/artifacts/journey.droplet-.../error-context.md). Signature404124947736— this signature already self-healed once before (drive20260811T183121Z, commit99393f9d9, anOWN_VPS_ORDERtest-fixture fix). This occurrence has a different, deeper root cause — the same generic error text is masking a real deploy-classification gap.Evidence
Standup.Deploy(logs/founding-state.log:111-113, this run):That detail comes from the
UnitActiveprobe atinternal/founding/deploy.go:332-350(added per #443 specifically to catch a no-op deploy reporting green).But the deploy's own log, ONE stage earlier, already recorded the real reason and it got discarded (
logs/founding-state.log:106):That's
internal/clan/adapter.go:241-244— the gateway's eval-preflight failed, sodep.Runskipped the node (continue) instead of runningmachines updateon it.applyControlPlane(internal/founding/deploy.go:401-406) builds itsclan.DeployRequestwithout settingStrict— it defaults tofalse, which per its own doc (internal/clan/clan.go:208-210) means "exclude-and-report" rather than fail. That policy makes sense for a multi-node fleet deploy, butapplyControlPlanealways scopes to exactly one node (Nodes: []clan.NodeID{node}), so "exclude-and-report" on the only requested node is indistinguishable from doing nothing while returning success (dep.Run→(res{Skipped:[gateway]}, nil)→applyControlPlane→(nil, nil)). The classified skip reason that WAS available (clan.NodeSkip.Kind/.Detail,internal/clan/clan.go:232-236, populated fromreadinessAt) is silently dropped; only the downstreamUnitActiveprobe's genericFailUnknownmessage reaches the operator.Separately, the real droplet's own systemd journal (
logs/droplet-journal.txt) shows a genuine activation problem in the same window:clan-switch-gateway-bbdfcf38.serviceandclan-switch-gateway-a0a0b47e.service(both drivingswitch-to-configuration switchfornixos-system-gateway-26.11.20260612.173d0ad) each fail withstatus=4/NOPERMISSION(lines 1268-1305), andourcloud-control-plane.servicecrash-loops on/srv/ourcloud/bin/control-plane: No such file or directoryfor ~35s (lines 1140-1219) before finally starting cleanly at line 1411+. It's unclear from static logs alone whether this switch activity is from THIS deploy step (in which caseclan machines updateapparently exited 0 despite the remote failure — a masked-exit gap ininternal/clan/errors.go:233-279'slogSaysFailed, whose marker list doesn't recognize"failed (status"/"NOPERMISSION"/"Failed with result 'exit-code'") or from the earlier nixos-anywhere install/activate step (unrelated to this deploy's preflight-skip).Suspected layer(s)
internal/founding/deploy.go(applyControlPlane) — doesn't setStrict: truefor its single-node deploy, and discardsdep.Run's*DeployResult.Skippedclassification entirely (_, runErr = dep.Run(...)).internal/clan/adapter.go/internal/clan/errors.go— the masked-exit detector (logSaysFailed) may not recognize this NixOSswitch-to-configurationfailure shape; it has a documented history of delicate false-positive/false-negative tuning (#451, #456), so any new marker needs care not to catch the benignourcloud-control-plane.serviceboot-time crash-loop visible in the same journal.switch-to-configuration switch/clan-switch-gateway-*.serviceNOPERMISSION failure may be a genuine, separate activation-permission defect worth investigating directly on a droplet.What plugging it needs
clan machines updateinvocation output for this deploy step (not just the harvestedjournalctl) to determine whether the gateway node failed preflight (skip path) or passed preflight and itsmachines updateexited 0 despite the remote switch failing (masked-exit path) — these are mutually exclusive and point at different fixes.applyControlPlaneshould setStrict: true(it only ever targets one node, so "exclude-and-report" degrades to "silently do nothing") and surfaceNodeSkip.Kind/.Detailthrough toDeployFailureinstead of the genericFailUnknownfrom theUnitActiveprobe.logSaysFailedto recognize a realswitch-to-configuration/clan-switch-*unit failure, scoped narrowly enough not to re-trigger the false positives #451/#456 already fixed, and not to catch the benignourcloud-control-plane.servicerestart-loop noise in the same log.switch-to-configurationexits NOPERMISSION on this droplet — that's the actual substantive activation defect underneath whichever classification gap is confirmed.Not self-fixed: multiple plausible root causes I can't disambiguate from static logs, touches a failure-classifier with a documented regression history, and the underlying activation failure is real droplet infra state outside this checkout.
drive
20260812T010139Zred atsupply:journey leg "control-plane" went red: (no fault line rendered)evidence:
test-results/…/20260812T010139Z/on matou-workstation (legs.json, droplet-journal.txt, trace)Disambiguated — it's the preflight-skip path (A), and the skip is a FALSE NEGATIVE
Reproduced
readinessAt's exact deploy-time eval (internal/clan/adapter.go:348) against this run's captured flake (test-results/drive-droplet/20260812T010139Z/state/clan-config), no droplet needed:So the gateway config evaluates cleanly. That settles the two branches:
"excluded: node does not evaluate"— theif !r.OK { … continue }branch atadapter.go:241-244.clan machines updatenever ran on the gateway. Theclan-switch-gateway-*.service … status=4/NOPERMISSIONindroplet-journal.txtand theourcloud-control-plane127-crash-loop are both from the earlier nixos-anywhere install, not this deploy step; the control plane that ends up serving was baked by that install.readinessAt's deploy-timenix evaldid not hit a real eval error — it failed transiently (cold-store / slow first eval / ctx deadline) and returned non-zero, whichreadinessAttreats as "does not evaluate." The classified reason (Readiness.Detail, populated fromexcerpt(res.Output)) was then dropped.The fix (two parts)
applyControlPlane(internal/founding/deploy.go:401-406) must fail loud on a skip. It always scopes to exactly one node (Nodes: []clan.NodeID{node}), so the defaultStrict:false"exclude-and-report" degrades to "silently do nothing and return success". SetStrict: true, and surface the skip'sNodeSkip.Kind/.Detail(internal/clan/clan.go:232-236) through to theDeployFailureinstead of the genericFailUnknownthe downstreamUnitActiveprobe produces. A single-node skip must reach the operator as "the gateway was skipped because ", never as a green deploy or the misleading "declared no control-plane unit" text.Harden
readinessAt(internal/clan/adapter.go:348) against a transient eval. A cold/slow/timed-outnix evalon the only node must not be silently classed as "does not evaluate" and skip the entire deploy. Add a bounded retry (or distinguish a transient/timeout/interrupted exit from a genuineFailConfigEval) so a real eval failure still reports, but a transient one is retried rather than swallowed.Tests
applyControlPlane: single-node deploy wheredep.RunreturnsSkipped:[gateway]must yield a loudDeployFailurecarrying the skip detail, not(nil,nil).readinessAt: a transient/non-eval exit (timeout/interrupt) is retried / not misclassified asFailConfigEval; a genuine eval error still surfaces with its detail.UnitActive(adapter.go:119-151) has no test seam (rawexec.CommandContext) — either add a command-runner seam or an integration assertion so this class is coverable.Config validity proven against the captured flake, so this is confidently the fix; the next real drive is the confirmation (and with part 1, if the eval trips again the drive will now self-explain instead of printing the generic message). Ben ruled: fix as-diagnosed,
ready-for-agent.Evidence:
test-results/drive-droplet/20260812T010139Z/on matou-workstation. Advances #378.swarm-claim host=matou-dev-server-01 run=4894
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #461 — status
success✅ close-report gates passed — every claim verified against main; closing.
envelope