Description
openab-cp currently handles only ctrl_c (SIGINT). Under docker stop/ECS/k8s, SIGTERM is sent first and escalates to SIGKILL after the grace period — the CP never runs its shutdown path. Additionally, shutdown aborts the sweeper first while WS tasks keep running, and in-flight delegations get no terminal result: connected runtimes see a TCP reset instead of a Close frame. (#1469 round-4 F12.)
Desired order: handle SIGTERM/SIGHUP via tokio::signal::unix; on shutdown, signal all connections (Close frame with reason), synthesize terminal results for in-flight delegations where possible, drain briefly, then stop the sweeper and exit.
Use Case
Every containerized deployment (ECS Fargate, k8s) stops tasks with SIGTERM. Without this, each deploy/scale-in looks like a crash to every connected runtime: abrupt socket resets, delegations resolved only by client-side deadline reconciliation instead of clean target_disconnected synthesis.
Description
openab-cpcurrently handles onlyctrl_c(SIGINT). Underdocker stop/ECS/k8s, SIGTERM is sent first and escalates to SIGKILL after the grace period — the CP never runs its shutdown path. Additionally, shutdown aborts the sweeper first while WS tasks keep running, and in-flight delegations get no terminal result: connected runtimes see a TCP reset instead of a Close frame. (#1469 round-4 F12.)Desired order: handle SIGTERM/SIGHUP via
tokio::signal::unix; on shutdown, signal all connections (Close frame with reason), synthesize terminal results for in-flight delegations where possible, drain briefly, then stop the sweeper and exit.Use Case
Every containerized deployment (ECS Fargate, k8s) stops tasks with SIGTERM. Without this, each deploy/scale-in looks like a crash to every connected runtime: abrupt socket resets, delegations resolved only by client-side deadline reconciliation instead of clean
target_disconnectedsynthesis.