PR #3233 added systemd readiness + watchdog notifications to core/server and core/ai/mcp. core/server-ng will replace core/server before the next release - the systemd wiring needs to land there too. This has to be done after core/server-ng fully replaces current core/server.
Scope
Mirror PR #3233 in core/server-ng:
systemd = ["dep:sd-notify"] cargo feature on core/server-ng/Cargo.toml.
core/server-ng/src/systemd.rs with notify_ready / notify_stopping / notify_status / ping_watchdog, mirroring core/server/src/shard/systemd.rs.
- Emit
READY=1 after all listeners bind, before fallible disk I/O.
- Periodic watchdog task gated by
sd_notify::watchdog_enabled(), ping at timeout / 2, cooperative cancellation via the existing shutdown path.
- On shutdown:
STOPPING=1 → drain → STATUS=graceful shutdown timed out when drain returns false.
Docs follow-up
Update apache/iggy-website once landed: bump the systemd section under https://iggy.apache.org/docs/ to point at iggy-server-ng, plus the unit-file skeleton (Type=notify, WatchdogSec=, ProtectSystem=, PrivateTmp=, NoNewPrivileges=, CapabilityBoundingSet=).
Acceptance
cargo build -p server-ng --features systemd succeeds on Linux + macOS.
- Under
Type=notify + WatchdogSec=: READY=1 after bind, periodic WATCHDOG=1, STOPPING=1 on SIGTERM, STATUS= on drain timeout.
References
PR #3233 added systemd readiness + watchdog notifications to
core/serverandcore/ai/mcp.core/server-ngwill replacecore/serverbefore the next release - the systemd wiring needs to land there too. This has to be done aftercore/server-ngfully replaces currentcore/server.Scope
Mirror PR #3233 in
core/server-ng:systemd = ["dep:sd-notify"]cargo feature oncore/server-ng/Cargo.toml.core/server-ng/src/systemd.rswithnotify_ready/notify_stopping/notify_status/ping_watchdog, mirroringcore/server/src/shard/systemd.rs.READY=1after all listeners bind, before fallible disk I/O.sd_notify::watchdog_enabled(), ping attimeout / 2, cooperative cancellation via the existing shutdown path.STOPPING=1→ drain →STATUS=graceful shutdown timed outwhen drain returnsfalse.Docs follow-up
Update apache/iggy-website once landed: bump the systemd section under https://iggy.apache.org/docs/ to point at
iggy-server-ng, plus the unit-file skeleton (Type=notify,WatchdogSec=,ProtectSystem=,PrivateTmp=,NoNewPrivileges=,CapabilityBoundingSet=).Acceptance
cargo build -p server-ng --features systemdsucceeds on Linux + macOS.Type=notify+WatchdogSec=:READY=1after bind, periodicWATCHDOG=1,STOPPING=1on SIGTERM,STATUS=on drain timeout.References
core/server/src/shard/systemd.rs,core/server/src/shard/tasks/periodic/systemd_watchdog.rs- patterns to mirror.