Repository navigation
Conversation
The chart renders OPENSHELL_PEER_ENDPOINT from an unbracketed pod IP, which is not a valid URI on IPv6 clusters. Closes #5673 Signed-off-by: divesh <dgude@nvidia.com>
|
/ok to test 78ede26 |
1AbdullahButt
left a comment
There was a problem hiding this comment.
Correct. The chart's _gateway-workload.tpl is the only place that renders $(OPENSHELL_POD_IP) into OPENSHELL_PEER_ENDPOINT. derive_peer_endpoint is the only reader, so normalizing there covers every consumer: gateway_members registration, build_peer_channel's Endpoint::from_shared, and the supervisor redirect. The fallback path builds a DNS name (pod.service.namespace.svc.cluster.local), so it doesn't need the helper. I also checked OPENSHELL_SUPERVISOR_POOL_ADVERTISE_IP and the Kubernetes driver's pod_ip use. Both pass the host and port separately and never build a URL from them, so they don't have the same bug.
I copied bracket_ipv6_host into a standalone program and ran it in a rust:1 container. On top of the four test cases, these behave as expected:
http://fd00::5:8080/xbecomeshttp://[fd00::5]:8080/x.http://::1:8080becomeshttp://[::1]:8080.http://fd00::5, with no port, is left unchanged. That's fine, because the chart always appends a port.
I did not get cargo test -p openshell-server to finish locally. The full crate build ran past my time limit.
Reviewed with help from Claude Code.
Summary
Bracket an IPv6 host in
OPENSHELL_PEER_ENDPOINTso gateway replicas can reach each other on IPv6 clusters. The chart rendershttp://fd00::5:8080, which is not a valid URI; the gateway now useshttp://[fd00::5]:8080.Related Issue
Closes #5673
Changes
OPENSHELL_PEER_ENDPOINT. IPv4, hostname, and already-bracketed endpoints are unchanged.Testing
cargo test -p openshell-server --lib peer_endpoint,cargo fmt, andcargo clippy -p openshell-server --all-targets -- -D warningspassDeployed two gateway replicas on an IPv6-only kind cluster: exec through either replica succeeded, and the peer endpoints logged as
http://[fd00:10:244::a]:8080.Checklist