Skip to content

Port systemd integration to core/server-ng, update docs #3247

@hubcio

Description

@hubcio

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions