-
Notifications
You must be signed in to change notification settings - Fork 402
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure container ports without names are also included in the head node service #891
Ensure container ports without names are also included in the head node service #891
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Yicheng-Lu-llll for this contribution! Do you mind add some tests?
Can you rebase with master? #893 can fix the CI failure in "Go-build-and-test / Build Operator Binaries and Docker Images". Thanks! |
3b93062
to
2fa40fb
Compare
Define availableWorkerReplicas.
Relieve flakiness.
Updated. Sorry for the above commit issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…de service (ray-project#891) Container ports without names will not be ignored.
Why are these changes needed?
issue 463 describes that if container port names are not set in the ray cluster, workers are unable to communicate with the head due to the wrong head node Kubernetes service config.
This is because in the current implementation:
if port.Name == "", Only the last container port will be considered since all container ports have identical keys (port.Name) .
Considering these:
container port names are optional (link). -> Completely legal to not set or partially set container port names.
multi-port-services must set port names (link link). -> head node Kubernetes service must set service port names.
As long as service port numbers are equal to container port numbers, the head node service's functionalities will work just fine( e. g. workers can communicate with the head). -> There is no extra constraint to the service port name or container port name except the name should be unique. -> This means though it is great to set the service port name equal to the container port name for better understanding, it is not mandatory.
Fact 1,2,3 -> The fix should keep all functionalities working even without setting container port names. It can be done by giving service port names.
Gcs, dashboard, and client's Port number can be changed(link). -> We cannot hardcode the service port names since we have no idea what the associate port number is used for.
Fact 4,5 -> Assigning random but unique service port names if the user does not set the container port names is a good idea.
With the above consideration, This PR adds the following to fix the issue 463:
Related issue number
Closes #463
Checks
Step1:
Clone my repo and checkout to
PortsWithoutNameAreIgnored
branchStep2:
Follow DEVELOPMENT.md to build Docker image and install kuberay operator.
Step3:
remove container port names in kuberay/ray-operator/config/samples/ray-cluster.complete.yaml:
Step4:
#path: kuberay/ kubectl apply -f ray-operator/config/samples/ray-cluster.complete.yaml
Step5: