[Core] Bind gRPC servers to the node address family - #65867
Conversation
Signed-off-by: 400Ping <jiekaichang@apache.org>
Signed-off-by: 400Ping <jiekaichang@apache.org>
There was a problem hiding this comment.
Code Review
This pull request updates Ray's gRPC server binding logic to accept a node_ip_address string instead of a boolean flag, allowing servers to dynamically bind to the correct wildcard address (0.0.0.0 or ::) matching the node's address family. This change is integrated across both C++ and Python/Cython layers. Feedback on these changes includes simplifying the IsIpv6LoopbackAvailable test helper to avoid a full TCP handshake, passing node_ip_address by const std::string & in the GrpcServer constructor to prevent unnecessary string copies, and removing the Optional[str] type hint in Cython to avoid a potential runtime NameError.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
Reviewed by Cursor Bugbot for commit ac759e2. Configure here.
Signed-off-by: 400Ping <jiekaichang@apache.org>

Description
This PR allows Ray's core gRPC servers to bind using the address family of the
node's advertised IP address.
Previously,
ray start --node-ip-address=<IPv6 address>advertised an IPv6node address, but
GrpcServerselected its wildcard bind address from thesystem's localhost resolution. On IPv4-first systems, this caused the server
to listen on
0.0.0.0even when the Ray node advertised an IPv6 address.As a result, an IPv6-only worker could attempt to connect to the GCS through
IPv6 while the GCS was only listening on an IPv4 socket.
The new bind behavior is:
localhost127.0.0.1127.0.0.1::1::10.0.0.0::Changes
0.0.0.0::CoreWorker, and the dashboard agent.
IPv6.
port.
Related issues
Related to
#54660
ray-project/kuberay#5215
Additional information