feat(gateway): real FreeBSD rc.d detection in get_gateway_runtime_snapshot #7
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "feat/gateway-freebsd-rcd-detection"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Deeper fix behind PR #6.
get_gateway_runtime_snapshot()only had systemd/launchd branches, so on FreeBSD it fell through tomanager="manual process"—hermes statuscouldn't report the real gateway state.is_freebsd()helper._probe_freebsd_service_running()— probes thehermes_daemonrc.d service viaservice hermes_daemon onestatus(reports running regardless of rcvar enable; works without root; fail-safe), mirroring the launchd probe.manager="rc.d (hermes_daemon)",service_installed(rc.d file present),service_running(onestatus),service_scope="rc.d".Now
hermes statusreports installed/running on FreeBSD via the primary path (line 484), not just the fallback string.Not in scope:
get_managed_gateway_pids()restart-drain (systemd/launchd only) — liveness already works viafind_gateway_pids(); rc.d restart-drain is a separate follow-up.py_compileclean; wiring + branch ordering verified. (Runtime-verify on a FreeBSD host.)🤖 Generated with Claude Code
`hermes status` reported the gateway as "manual process" on FreeBSD because get_gateway_runtime_snapshot() only had systemd/launchd branches and fell through. Add a proper FreeBSD rc.d path so status reports real state: - is_freebsd() helper (sys.platform.startswith("freebsd")). - _freebsd_rcd_service_path() + _probe_freebsd_service_running() — probes the hermes_daemon rc.d service via `service hermes_daemon onestatus` (reports running regardless of the rcvar enable flag; works without root; fail-safe on timeout/missing binary), mirroring the launchd probe. - snapshot branch: manager="rc.d (hermes_daemon)", service_installed (rc.d file present), service_running (onestatus), service_scope="rc.d". This is the deeper fix behind the status.py fallback message (PR #6). Not changed: get_managed_gateway_pids() restart-drain path (systemd/launchd only) — gateway liveness already works via find_gateway_pids(); rc.d restart-drain is a separate follow-up. py_compile clean; wiring + branch-ordering verified. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>