fix(profiles): correct misleading per-profile gateway port docstrings
The s6 profile-gateway docstrings claimed the bind port comes from a
`[gateway] port` key in config.yaml ("the single source of truth"). No such
key exists or is read anywhere — the API server port is resolved by
gateway/config.py from `API_SERVER_PORT` (or `platforms.api_server.extra.port`)
and defaults to 8642. The wrong reference actively misled a Docker user into
setting a non-functional `gateway.port`.
Point both docstrings (`S6ServiceManager._render_run_script`,
`_maybe_register_gateway_service`) at the real knob, and note the practical
consequence: since each supervised profile gateway loads its own HERMES_HOME,
two profiles left at the default both try to bind 8642 — each needs a distinct
`API_SERVER_PORT` in its own `.env`.
This commit is contained in:
+10
-4
@@ -1190,10 +1190,16 @@ def _maybe_register_gateway_service(profile_name: str) -> None:
|
||||
can re-register manually later via the gateway start command,
|
||||
which goes through the same dispatch path.
|
||||
|
||||
Port selection is governed by the profile's ``config.yaml``
|
||||
(``[gateway] port = …``) — there is no Python-side allocator
|
||||
(PR #30136 review item I5 retired the SHA-256-derived range
|
||||
[9200, 9800) because it was dead code through the entire stack).
|
||||
Port selection: each supervised profile gateway loads its own
|
||||
``HERMES_HOME`` and binds the port resolved by ``gateway/config.py``
|
||||
from that profile's environment — ``API_SERVER_PORT`` (or
|
||||
``platforms.api_server.extra.port`` in the profile's
|
||||
``config.yaml``), defaulting to 8642. There is no ``[gateway] port``
|
||||
key and no Python-side allocator (PR #30136 review item I5 retired
|
||||
the SHA-256-derived range [9200, 9800) as dead code), so two
|
||||
profiles that both leave the port at its default will both try to
|
||||
bind 8642 — give each profile a distinct ``API_SERVER_PORT`` in its
|
||||
``.env``.
|
||||
|
||||
Host short-circuit: check ``detect_service_manager()`` first and
|
||||
return immediately if it isn't ``"s6"``. This keeps host
|
||||
|
||||
Reference in New Issue
Block a user