archie-gateway and archie-state-store serve health but emit no READY, so Type=notify would time them out #1060

Closed
opened 2026-10-27 13:38:51 +00:00 by sam · 0 comments
Owner

Found while adding sd_notify to archied (2fcc32d8). markServing exists only on archied health surface (internal/app/archied/health.go:36, called at bootstrap.go:1568), and announceReady is called only there. RunGateway and RunStateStore serve health endpoints of their own - archie-state-store even takes an explicit -ready-addr flag - but neither tells systemd anything.

So if either is ever run as Type=notify it will hang until TimeoutStartSec and be killed, in a restart loop, while actually being healthy.

Fix direction: give both the same treatment as archied - emit READY at the point each considers itself serving, reusing whatever readiness notion each already has instead of inventing a second one (the state store already has a ready address; that is the natural hook). Requires the sd_notify helper to move somewhere both can reach, since it currently lives in package archied. Do not enable Type=notify for them until that lands.

Close reason

Delivered and pinned; verified against HEAD this session (#1171 via internal/app/controlplane/container_settings.go, #1174 via internal/app/archied/sd_notify.go call sites). Container tests ok 1.828s; archied notify tests ok 5.880s.


Imported from beads archie-core-4n2j · GitHub #1174 · type task · priority P3 · created 2026-09-21 · closed 2026-09-30

Found while adding sd_notify to archied (2fcc32d8). markServing exists only on archied health surface (internal/app/archied/health.go:36, called at bootstrap.go:1568), and announceReady is called only there. RunGateway and RunStateStore serve health endpoints of their own - archie-state-store even takes an explicit -ready-addr flag - but neither tells systemd anything. So if either is ever run as Type=notify it will hang until TimeoutStartSec and be killed, in a restart loop, while actually being healthy. Fix direction: give both the same treatment as archied - emit READY at the point each considers itself serving, reusing whatever readiness notion each already has instead of inventing a second one (the state store already has a ready address; that is the natural hook). Requires the sd_notify helper to move somewhere both can reach, since it currently lives in package archied. Do not enable Type=notify for them until that lands. ### Close reason Delivered and pinned; verified against HEAD this session (#1171 via internal/app/controlplane/container_settings.go, #1174 via internal/app/archied/sd_notify.go call sites). Container tests ok 1.828s; archied notify tests ok 5.880s. --- _Imported from beads `archie-core-4n2j` · GitHub #1174 · type task · priority P3 · created 2026-09-21 · closed 2026-09-30_
sam added the lowtask labels 2026-10-27 13:38:51 +00:00
sam self-assigned this 2026-10-27 13:38:51 +00:00
sam closed this issue 2026-10-27 13:38:51 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#1060