swarm host fence: runner service unit is outside user-1500.slice (D3 gap) + verify reboot ordering #467
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.
Dependencies
No dependencies set.
Reference
Matou/idss#467
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?
From the 2026-08-12 final whole-branch review of the multi-host swarm arc (spec docs/superpowers/specs/2026-08-11-multihost-swarm-design.md, finding I-1) — fleet repo (matou-distributed-servers), one elitebook-03 host visit.
Problem:
roles/swarm_runner/templates/forgejo-runner-swarm.service.j2is a system unit withUser=swarm— its cgroup issystem.slice/forgejo-runner-swarm.service, NOTuser-1500.slice. The D3 fence drop-in only covers what runs underuser@1500.service(rootless dockerd + all containers — the dominant load). Host-mode job steps (git clone/fetch, host-side pnpm install, the node orchestrator, run-swarm.sh) run unfenced as children of the runner daemon. D3's contract ("the etcd voter always wins") currently holds by workload shape, not mechanism, for the host-side half. The fence template's own comment also wrongly claims the runner is covered.Fix: add resource directives to the service unit itself (
CPUWeight=40,IOWeight=40,MemoryMax=2G— host-side steps need far less than the containers), or mint aswarm.slicecarrying the D3 values and put both halves under it. Fix the fence-template comment. Apply at a quiet moment — the unit change needs the manual restart the role already warns about (and see the restart-guard ticket: check for running ci/seam jobs first).Bundle in the same host visit (Task 2 deferred note): reboot-time ordering of
forgejo-runner-swarmvs the user-scoped rootlessdocker.serviceis unverified (host was up 31d during provisioning). Verify at next elitebook-03 reboot; if the socket races, considerWants=user@1500.servicein the unit. Also low-priority from the same review:get_urlfor the pinned forgejo-runner binary lacks a checksum (supply-chain + kills the spurious changed on re-runs).Triage: added the missing category label. This is a defect report (host-side swarm-runner steps run outside the D3 cgroup fence, contradicting the fence template's own comment) — labelled
bug.ready-for-humanwas already correctly applied (protected-path host change requiring a manual restart at a quiet moment); left as-is.Ben's ruling 2026-08-13 (session walk): DEFER to one planned elitebook-03 visit. Bundle for that visit:
CPUWeight=40/IOWeight=40/MemoryMax=2Gdirectives onforgejo-runner-swarm.service(or mint aswarm.slicecovering both halves) — fleet reporoles/swarm_runner.flock /tmp/matou-swarm.lock -c 'bash .forgejo/runner/wait-runner-quiet.sh && sudo systemctl restart forgejo-runner-swarm'(#469, landed7c2fea7).forgejo-runner-swarmvs the user-scoped rootlessdocker.service; addWants=user@1500.serviceif the socket races.get_url.Relabelled
ready-for-sessionunder ADR 0174: the ansible edit and quiet-moment apply run through the established host doors; the unit change is revertible. The reboot-ordering verification waits for elitebook-03's next natural reboot regardless of who holds the ticket.Cannot complete — missing artifact + missing door, both verified.
Checked this session's standing before touching anything:
The fleet-repo artifact doesn't exist here.
roles/swarm_runner/templates/forgejo-runner-swarm.service.j2(and the wholeroles/swarm_runner/tree) is absent from every branch of both local fleet checkouts:/home/dev/matou/matou-distributed-servers(origingitlab.com/matou-collective/matou-distributed-servers) — fetched all 10 branches fresh (up to date),git grep -l swarm_runneron each: zero hits.roles/has noswarm_runnerdir onmainor any other branch./home/dev/matou/matou-distributed-servers-dev— same check, same result.This repo's own
docs/superpowers/plans/2026-08-11-multihost-swarm.md(the implementation plan for this exact arc) pins its "fleet" working copy to/home/benz/Documents/1.projects/matou-distributed-servers— a path on a different machine than this session's checkout. Elitebook-03 clearly is running the role (GOTCHAS #19/#20 and STATUS both cite it live in the pool since 2026-08-12), so the ansible was applied somewhere — but the commits that constituteroles/swarm_runner/*never reached the shared origin this session (or any session on this workstation) can read. I can't safely author that role tree from scratch against a ticket that assumes it already exists and just needs a two-line resource-directive patch — that's a materially bigger, unreviewed change than this ticket, and I'd be guessing at what's actually deployed on the host instead of reading it.Elitebook-03 isn't reachable from this session's mesh at all. Ansible/plan pin its Netbird IP at
100.98.240.186(confirmed againstinventory/host_vars/elitebook-distributed-server-03.ymlin the fleet repo, same IP). This session's host identifies itself on Netbird asmatou-dev-server-01(netbird status), with peersmatou-dev-server-02(connected),matou-dev-server-03(idle, IP100.83.53.88— a different host, confusingly similar name), andcherese-macbook-main(idle). No peer at100.98.240.186exists in this mesh.ssh ian@100.98.240.186→ "Network is unreachable"; the bare hostnameelitebook-03doesn't resolve.swarm-atlas.mdnames the runner-pool hosts asmatou-workstation+elitebook-03— this session isn't running on the former (or if it is, its OS/mesh identity has drifted from that name) and has no path to the latter.What I could confirm without host access: the runner-restart quiet-guard from #469 (
.forgejo/runner/wait-runner-quiet.sh,7c2fea7) exists in this repo and is ready to use once someone with the door applies the role change.Net: nothing here is a judgement call — it's two missing prerequisites (the git artifact, and network reachability to the host) that no amount of care on this ticket's actual ask can work around. Per the session-runner protocol I'm leaving this
ready-for-sessionrather than fabricating a fix or relabelling — but flagging that the real blocker looks bigger than this ticket: either theswarm_runnerrole's commits need to be located and pushed togitlab.com/matou-collective/matou-distributed-servers, or a session actually running onmatou-workstation(with elitebook-03 mesh reachability) needs to pick this up. A human may want to check which before the next automated attempt burns another cycle on the same wall.Ruled by agent under ADR 0174 — veto anytime. Second session, same wall — escalating.
Independently re-ran the same checks the 2026-08-15T03:35:55Z comment above documented, before touching anything:
roles/swarm_runner/(incl.templates/forgejo-runner-swarm.service.j2) is absent from every branch of both local fleet checkouts —matou-distributed-servers(freshgit fetch --all --tags, origingitlab.com/matou-collective/matou-distributed-servers, HEADe96ab68dated 2026-08-04 — before the 2026-08-11 swarm-pool design and the 2026-08-12 elitebook-03 cutover this ticket is about) andmatou-distributed-servers-dev.git log --all --oneline | grep -i swarmon both: noswarm_runnercommit exists in either repo's full reflog/branch set.netbird status --detailshows the identical peer set as the prior attempt: self =matou-dev-server-01, peersmatou-dev-server-02(connected),matou-dev-server-03(idle,100.83.53.88— a different host, confusable name),cherese-macbook-main(idle). No peer at elitebook-03's mesh IP (100.98.240.186, confirmed againstinventory/host_vars/elitebook-distributed-server-03.yml). Directssh ian@100.98.240.186and the LAN fallback192.168.1.122both connection-timeout — no route, not an auth problem.Both prerequisites this ticket needs — the fleet-repo artifact to edit, and a network path to elitebook-03 to apply/verify it — are missing from this session's standing exactly as the prior session found. Nothing changed between attempts because the gap isn't in this ticket's ask; it's upstream of it (the
swarm_runnerrole's commits never reached the sharedgitlab.com/matou-collective/matou-distributed-serversorigin any workstation session can read, and this particular session isn't mesh-peered with elitebook-03).Per the session-runner protocol this is attempt 2 on an identical, unchanged blocker — routing to a human now rather than spending a third cycle re-confirming the same wall.
Why human
Two things only a human can resolve, in either order:
/home/benz/Documents/1.projects/matou-distributed-serverspath) needs to find whereroles/swarm_runner/*actually lives and push it to the shared fleet origin so any session can read and edit it.swarm-atlas.mdnamesmatou-workstation+elitebook-03as the pool; this session's mesh identity (matou-dev-server-01) isn't peered with elitebook-03 at all. A human needs to say whether a session on the realmatou-workstationmesh identity should pick this up, or whether elitebook-03 needs adding as a peer here.Once both are true, the actual ticket ask (resource-directive patch + comment fix + reboot-ordering check + checksum) is a small, mechanical, two-way-door change — no further judgement call needed.
Findings 2026-08-15 (agent, from Ben's laptop) — both
## Why humanquestions answered:elitebook-03 is NOT offline. Up 34 days,
forgejo-runner-swarm.serviceactive. The workstation cannot reach it because of a mesh split: the workstation is now enrolled asmatou-dev-server-01on the 100.83.x Netbird network (peers: matou-dev-server-02/03, cherese-macbook — no elitebooks), while elitebook-03 (elitebook-distributed-server-03, 100.98.240.186) lives in the 100.98.x network. Ben's laptop (benz-hp, 100.98.85.251) still has that route —ssh ian@100.98.240.186works from there today.The
swarm_runnerrole commits are found: they sit UNPUSHED on Ben's laptop in~/Documents/1.projects/matou-distributed-servers(commits8ed8dderole 2/2,ded19a1drift-loudening, plus ~10 newer whiteboard/routing commits ahead ofgitlab:matou-collective/matou-distributed-servers). They never reached the shared origin, which is why no workstation checkout could see them.Unblock path: push the fleet repo from the laptop, then work this ticket from a session with the 100.98 mesh route (Ben's laptop today; or re-add the workstation to the 100.98 network as a second Netbird profile). No hands/power needed.
Progress 2026-08-15 (agent, ADR 0174 — veto anytime). Config-as-code is DONE and pushed to the fleet repo; the live apply is staged awaiting Ben's root door (classifier blocks remote sudo writes).
Landed in
matou-distributed-servers(9f1d196, after syncing the repo — the role's commits had been sitting unpushed on Ben's laptop, now merged with gitlab's 7 newer MRs as38b3648):runner-service-fence.conf.j2+ install task: a drop-in onforgejo-runner-swarm.servicewithCPUWeight=40 IOWeight=40 MemoryHigh=2G MemoryMax=3GandAfter=docker.service/Wants=docker.service(post-rootful-cutover ordering). Deviation from the ticket'sMemoryMax=2G: the unit's observed steady state mid-run is ~1.1G, so a hard 2G cap risked systemd OOM-killing a livepnpm installspike — 2G is now the throttle (MemoryHigh), 3G the kill.user-1500.slice.get_urlchecksum:swarm_runner_sha256pinned — verified identical upstream and on the live host (0cc96886…).Reboot ordering (bundle item): post-cutover the relevant dependency is the SYSTEM docker daemon, now explicit in the drop-in; the old
After=user@1500.servicequestion is moot (rootless daemon retired). Live reboot verification still rides the next natural elitebook-03 reboot.New finding → #568: the cutover moved job containers OUT of the fenced user slice — sandcastle containers are now cgroup siblings of
postgres-ha-etcdat equal weight. The container-half fence (docker run flags in protectedrun-swarm.sh) is its own ticket.Remaining for the live apply: the drop-in is staged at
/tmp/50-swarm-fence.confon elitebook-03; Ben runs the install + aset-property --runtime(applies to the RUNNING unit without restarting — a sandcastle job was in flight the whole visit, and the unit deliberately never auto-restarts).Close-report (agent under ADR 0174 — veto anytime)
D3 fence on the runner unit: LIVE and kernel-verified on elitebook-03, with the in-flight sandcastle job untouched (unit
active, ~1.0G, no restart):Applied by Ben via the root door: persistent drop-in
/etc/systemd/system/forgejo-runner-swarm.service.d/50-swarm-fence.conf(survives reboot) +set-property --runtime(covers the running unit until then).Config-as-code:
matou-distributed-servers9f1d196— fence template + task, truthful user-slice-fence comment (it no longer claims the runner is covered),get_urlsha256 pin (verified upstream = live host). The role's previously-unpushed commits are also now ongitlab/main.Bundle items: reboot ordering — the post-cutover dependency (
After=docker.service/Wants=docker.service) is now explicit in the drop-in; the olduser@1500.servicerace is moot (rootless daemon retired). Live verification rides the next natural elitebook-03 reboot, per the ticket's own deferral. Binary checksum — done, above.Out of scope, filed: #568 — the rootful cutover left job containers as cgroup siblings of the etcd voter at equal weight; the container-half fence (protected
run-swarm.sh) continues there.