deploy-newsletters: the guest OOM-killed idss-control-plane mid-deploy — every "removed" service was still running on the box, and the restarted plane never resumed or failed the lost deploy run #1348
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#1348
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
Rehearsal drive
20260909T031934Z(private path, brands target) red atdeploy-newsletters, the 6th of 7 service cycles. The leg never reached P4-S5 and the drive died on the whole-test ceiling 69 min later. The readout that would have named this has now been repaired in-lane (commita5ec128a, GOTCHAS #206) — this ticket is the fault that readout was hiding.Newsletters/Listmonk never deployed at all:
grep -i listmonkacross every harvested log returns only the control plane's start-up wiring lines, andnewslettersappears zero times inlogs/guest-caddy.log.The evidence
1. The control plane was OOM-killed mid-deploy.
logs/guest-control-plane.log, ~2.5 min into the newsletters deploy (tick-newslettersgreen at 04:12 perartifacts/legs.json):The unit came back 6 s later and re-wired every port cleanly — and then sat there. Nothing resumed the deploy, and nothing failed it: the S4 surface showed neither
[data-field="deploy-failure"]nor[data-status="setup-error"]for the next 67 minutes (the poll inapp/tests/e2e/fixtures/provision.ts:453-476checks both every 10 s and would have thrown in seconds). A deploy run lost to a control-plane restart is a black box to the operator — the case ADR 0027 exists to forbid.2. The box was out of memory because REMOVED services never left it.
logs/guest-resources.log, harvested 05:22 on a 2 vCPU / 3.6 GB guest with no swap:Still resident at 05:22, with their start times:
omeka+omeka-db(03:40), paperlessgranian+celeryd×2 +redis+postgres(03:50), grampswebgunicorn×4 +celery×3 — ~1.4 GB RSS between them alone (04:04),mariadbd+php-fpm: pool limesurvey×3 (04:08), gristnode×2 (04:11).Every one of those is a service whose removal leg had already gone green (
artifacts/legs.json):remove-archive03:41,remove-document-archive03:52,remove-whakapapa04:06,remove-surveys04:09,remove-data-collections04:12.3. They were still in the DEPLOYED set, not just lingering processes. The control plane's own deploy-time health gate (
attempt=1 attempts=36) kept probing them on every later deploy —logs/guest-control-plane.log:Omeka was still serving those probes at 04:25:52 (
logs/guest-system-journal.log), 44 minutes afterremove-archivewent green. The one removal that did stick within its own leg isdata-collections: it is absent from the 04:12:25-29 probe set. So the removal reaches the config transiently and the service is back in the deployed set by the next cycle.Why this matters beyond one red
The brand-reach drive is designed around removal freeing the box — "REMOVE it before the next (the guest never has to fit them all)" (
app/tests/e2e/fixtures/brandreach.ts:49-51). That design is silently defeated, so the guest accumulates all seven services and dies of memory on the 6th. The drive'sremove-<slug>legs are green on a claim that is not true of the box:expectServiceGone(brandreach.ts:306-313) proves only that the S5 card vanished, andconfirmRemoveDeploy(brandreach.ts:277-299) proves only that the review diff carried a REMOVES row. Neither reaches the guest. So the removal path — the #1114 class — is being reported green by a check that cannot see the failure.Suspected layer
Two distinct defects, and which to fix first needs a ruling:
internal/clanrender + the deploy/removal path, or the co-host selection the next tick re-submits). The decisive question the evidence does not settle: does the removal's generated config actually drop the service and the switch fail to stop the units, or does the next cycle's tick re-add every previously-removed service from a picker/config state that never lost them? NoteunselectServiceOnGateway(brandreach.ts:251-254) asserts the target service readsdata-status="selected"on re-entry and that passes — worth checking what ELSE the picker still has ticked at that moment.A third question for the ruling: whether the 2 vCPU / 3.6 GB private-path guest is the right box for a seven-service walk at all, or whether (1) fixed makes it comfortable again. Sizing is a harness decision; (1) and (2) are not.
Filed
confident:false: fixing (1) means deciding what "remove" is contracted to do to a running service, and fixing (2) means deciding what the operator is shown when a deploy run dies with its runner — both are product-behaviour rulings, not mechanical repairs. The drive re-fires straight into this red until it is settled.drive
20260909T031934Zred atdeploy-newsletters:page.waitForTimeout: Target page, context or browser has been closedevidence:
/home/swarm/swarm/Matou/idss/test-results/private-path/20260909T031934Zon matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was capturedRuled by agent under ADR 0174 — veto anytime.
Filed
confident:falseasking which of two defects to fix first and whether the guest sizing is wrong. Ruling: both defects are two-way doors — revertible commits, provable by tests, and neither on the one-way-door list — and both are bugs against already-stated contracts, not new product rulings, so a session may rule and act (ADR 0174 rule 1). Defect 1's contract is ADR 0210 ruling 5 (a removal mirrors an admission) + the #1134 gone-service class + the brand-reach design's own premise ("REMOVE it before the next"); defect 2's is ADR 0027 (no operation is a black box). I fixed both, and ruled the guest sizing is a harness question that defect 1 resolves (no resize) — exactly as the ticket framed it.What landed — commit
29b418832c385e426b5d5be4e475f0072e826991(advances #1348)Defect 1 — the root cause (accretion + the false-green removal path). A gateway co-host removal in
deployServicesOnly's removed loop (internal/provision/deploy.go) called onlyConfig().DetachService, which edits the clan inventory JSON — but the deployed-set truth is the presence of<slug>.nixin a machine dir (machineServices/ReadDeployedServices), and a routable port's render lands a module file, not an inventory instance. So the module stayed on disk,ComposeGatewayCohost(additive) kept importing it, the front-door route stood, the nix switch never stopped its units,machineServiceskept reporting it deployed, andd.Servicesre-ticked it into the next cycle'sdiffSelection— permanently. The guest accreted all seven and OOM-killed the plane on the 6th.clan.DetachPort(internal/clan/portroute.go), the removal mirror ofAttachPort: deletesmachines/<node>/<slug>.nix(idempotent) + drops any inventory instance in one commit.detachCohostPort(internal/provision/deploy.go) drives it for a gateway co-host routable port (cohostRoutablePort), then rewrites the front door without the route from the reduced fleet-wide union (#1172) and recomposes — so the one gateway switch drops the route, stops importing the module, and stops the service's units.Defect 2 — the 69-minute black box. The provisioning deploy run lives only in an in-memory
deployRunStore(internal/controlapi/provision.go) with a detachedcontext.Background()worker and no persistence / startup-reconcile / timeout, so an OOM-kill wipes the run and the poll endpoint returns 404no_deploy— indistinguishable from never-deployed. The clientpollToCompletion(dashboard/src/lib/api/provisionClient.ts) read that 404 asreturn lastand settled S4 on the last running frame forever (neitherdeploy-failurenorsetup-error).pollToCompletionnow distinguishes a never-seen run (last===null, unchanged) from a run watched running that the plane then 404s (a lost run) and fails loud with the cause — surfacing the S4 error frame instead of a silent hang. The #835 restart tolerance still rides out the connection-refused window (a definitive 404 is not a blip). This is the ADR 0027 black-box closer; persist-and-resume is a separate enhancement (filed #1350).Proof
TestDetachPort_RemovesModuleFromDeployedSet/_Idempotent/_RefusesSlugWithNoModule;TestDeploy_GatewayCohostPortRemovalDropsTheModule(per routable port: DetachPort + routeless front-door rewrite + recompose). Full./internal/clan/... ./internal/provision/...suites green.provisionDeployRestartTolerance.test.tsgains[RUNNING,404]→interrupted and[RUNNING,SETTLED,404]→settled; the #835 cases still green.go build ./...+go vet+gofmtclean; dashboardvue-tscclean; the pre-pusheslint .gate passed innix develop.Honest residue / follow-ups filed
remove-<slug>legs prove only the S5 card + review diff, never the guest; strengthen them to reach the box (the check that would have caught this directly).app/dist-keriweb/build output (blocked the push; worked around by removing the untracked artifact from this checkout).Live-drive confirmation (
#1277re-fire) runs on matou-workstation; this session ran on matou-dev-server-01 with no door to the drive host, so the proof here is the red→green unit/integration coverage, not a re-drive. If the next fire still reds atdeploy-newsletters, the runner re-opens.