region-ha-graceful-terminate
Region HA T1/DR-4: a planned member termination now hands its HA leases off in about 3 s instead of waiting out the lease (~15 min of 503s).
Root cause (proven in code, reproduced on a real EC2 terminate): at poweroff systemd stopped carlos-instance-control and D-Bus in parallel with the edge, so the StopGen proof a release needs failed and no marker was written; the release budgets also outlived the agent's 60 s wait.
- Units: the edge is ordered After= the control socket, control service and dbus.service (reverse stop order keeps them up until the edge stops); TimeoutStopSec=120. No Wants= on control (its start probe needs the edge's cgroup). Control: After=nftables.service, Restart=on-failure.
- Agent: one shutdown deadline, SIGTERM + 90 s; HA release steps (files Final, replica Finish, marker) are budgeted inside it. Single writer unchanged: no marker unless Final and Finish returned; a stuck finalizer leaves the lease to expiry.
- Witness: TestRootHATerminateRelease (rootrunner). Real agent, embedded units, systemd poweroff and EC2 TerminateInstances. Main: no marker. Branch: clean marker +3.21 s after TerminateInstances (run 20261108T040905-1fa711).
- Spec §9.9 records all of it, including what is not done: no ASG lifecycle hook (ruled unnecessary), and a dev group-member terminate check is owed after release.
Reviews: Opus task reviews, final whole-branch review and fix-wave re-review are clean; census t1 and t2 approved by Opus (Astra authored). CI green at 10329615.
Human
Planned HA member terminations release leases in ~3 s (T1/DR-4)
Commits
9
Discussions
0
0 open
Tasks
0/0
done
Discussions
- No discussions on this branch yet.
Tasks
- No tasks yet.
Activity
- paul@keymail.dev pushed 103296156 Fix graceful HA termination review findings
- paul@keymail.dev pushed 69c44066b Document planned HA termination and witness results
- paul@keymail.dev pushed a434b157b Keep HA termination witness evidence through fast shutdown
- paul@keymail.dev pushed c8f58880c Preserve socket activation for instance-control readiness
- paul@keymail.dev pushed b78f99af5 Add a real EC2 termination witness for HA lease release
- paul@keymail.dev pushed 037fccf32 Bound HA release steps by the agent shutdown deadline
- paul@keymail.dev pushed b9a4e6039 Order instance control after nftables for boot recovery
- paul@keymail.dev pushed 6d1f8cbef Keep HA shutdown control dependencies alive until edge stops
- paul@keymail.dev pushed 61f901664 plan: region HA graceful terminate (T1/DR-4)