carlos / platform Public

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