fix(podman): route local clients to the primary listener

As part of the RFC-0012 changes, Podman Machine uses the IPv4 loopback listener
for compute-driver callbacks while the local gateway launcher binds the primary
listener to IPv6. The launcher still registered that primary endpoint using
localhost.

This meant hostname resolution could direct CLI requests to the IPv4
callback-only listener instead of the primary gateway listener.

Now, we register the literal IPv6 loopback address when using the macOS default
while preserving explicit bind-address overrides.

Signed-off-by: Kris Hicks <khicks@nvidia.com>
This commit is contained in:
Kris Hicks
2026-09-17 13:14:28 -07:00
parent 769273f096
commit d7f11daa85
+5 -4
View File
@@ -151,11 +151,12 @@ EOF
if [[ -z "${OPENSHELL_BIND_ADDRESS:-}" && "$(uname -s)" == "Darwin" ]]; then
# Podman Machine reserves IPv4 loopback for its callback-only listener.
# Keep the primary listener distinct while using a hostname that resolves
# to IPv6 loopback for local CLI connections. An explicit bind address
# overrides this platform default.
# Keep the primary listener distinct and register its literal IPv6 address:
# `localhost` can resolve to IPv4 first, which would route CLI requests to
# the callback-only listener. An explicit bind address overrides this
# platform default.
PRIMARY_BIND_IP="::1"
CLI_ENDPOINT_HOST="localhost"
CLI_ENDPOINT_HOST="[::1]"
fi
if [[ ! "${GATEWAY_NAME}" =~ ^[A-Za-z0-9._-]+$ ]]; then