swarm host fence: container half — post-rootful-cutover, sandcastle containers are cgroup SIBLINGS of the etcd voter (D3 regression) #568
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#568
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?
Found while closing #467 (2026-08-15). The 2026-08-12 rootful-docker cutover on elitebook-03 moved job containers out of
user-1500.slice: with the system docker daemon (systemd cgroup driver), every container —postgres-ha-etcdAND eachsandcastle-*job container — gets its own scope directly undersystem.slice, all at the defaultCPUWeight=100. D3's "the etcd voter always wins" now holds for the HOST-MODE half only (#467's new unit fence); the container half — the dominant load — is unfenced and competes with the voter at equal weight.Fix direction: pass resource bounds at container start in
.sandcastle/run-swarm.sh(docker run --cpu-shares 40 --memory 10g --memory-reservation 8g --pids-limit 2048, mirroring the old user-slice fence values), or a--cgroup-parent=swarm.sliceminted with the D3 values. Per-container flags are the smaller door: no daemon config change, no restart, applies from the next job container.Why ready-for-session:
run-swarm.shis a protected.sandcastle/path (#445) — swarm workers must not edit it.Acceptance: a live sandcastle job container on elitebook-03 shows the bounded weights (
systemctl show <scope> -p CPUWeightor cgroup files) whilepostgres-ha-etcdkeeps default weight; offline test in the sandcastle suite asserting the docker-run flags.Close-report (agent under ADR 0174 — veto anytime; worked live from Ben's laptop, the one session with the elitebook door)
Landed (
f088e96+5f2f183onmain):.sandcastle/fence-lib.sh—swarm_fence_containerbounds eachsandcastle-*container at birth viadocker update(no restart):--cpu-shares 320 --memory 10g --memory-swap 10g --memory-reservation 8g --pids-limit 2048— the retired user-slice fence's values. Non-worker names are never touched (fencing the voter would invert D3). Best-effort, loud on failure, kill switchSWARM_FENCE=0.run-swarm.shas a self-terminating poller over the existing #435 birth-capture file — no seconddocker eventsstream, the wedge-check contract untouched.tests/fence-lib-test.sh: 16 green (stub docker, red-first).Live acceptance, elitebook-03 — exactly why this ran from a session with the door; the stub could never have caught either lesson:
docker updaterefuses a bare--memory("Memory limit should be smaller than already set memoryswap limit") —--memory-swapnow rides the cap.Final kernel state on the running worker vs the voter:
The running worker was fenced by hand with the lib's exact command; every worker born from the next swarm run is fenced automatically — the
run-swarm: D3 fence applied to sandcastle-…log line is the residual watch item.