kuberay
kuberay copied to clipboard
[Bug] [Operator] [Controller] [Service] | Ports without name are ignored
Search before asking
- [X] I searched the issues and found no similar issues.
KubeRay Component
ray-operator
What happened + What you expected to happen
Issue
If we create a new rayclusters.ray.io and we set in the headnode the following options
ports:
- containerPort: 10001
protocol: TCP
- containerPort: 8265
protocol: TCP
- containerPort: 8000
protocol: TCP
- containerPort: 6379
protocol: TCP
- containerPort: 9001
protocol: TCP
The ray operator will create the deployment but it will not include in the headnode kubernetes service the above ports. In turn, this leads to workers being unable to communicate with the head node and timing out trying to connect to a non-existing port.
If however we use a port names, then the service will be updated with the right ports
What should happen
The crd should validate that the container ports have a valid name, or the operator should reject crd and throw an error instead of spawning the pods.
Reproduction script
Create or edit a rayclusters.ray.io and add in the headnode some ports without a name, e.g.
ports:
- containerPort: 10001
protocol: TCP
- containerPort: 8265
protocol: TCP
- containerPort: 8000
protocol: TCP
- containerPort: 6379
protocol: TCP
- containerPort: 9001
protocol: TCP
The cluster will appear to be ok, but what will actually happen is workers starting and terminating after timing out
Anything else
No response
Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
Thanks for reporting the issue. I think the originally, we do have reference using port name. This should be definitely improved.
@Yicheng-Lu-llll Are you interested in this issue?
sure.
@Yicheng-Lu-llll Are you interested in this issue?
sure.