Skip to content
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

[Bug] Pod reconciliation fails if worker pod name is supplied #587

Merged
merged 2 commits into from
Sep 23, 2022

Conversation

kevin85421
Copy link
Member

@kevin85421 kevin85421 commented Sep 22, 2022

Why are these changes needed?

Deploy a RayCluster with a worker group with replicas >= 2 and supply a name in the pod template. The operator will fail to generate multiple worker replicas and will show an error creating the second pod. See this commit for more details. The following instructions can reproduce this bug.

# Step1: Clone my Kuberay repo (kevin85421/kuberay), and check out to the `replicate-worker-name-control-group` branch.
git clone git@github.com:kevin85421/kuberay.git
git checkout replicate-worker-name-control-group

# Step2: Install kuberay-operator
cd helm-chart/kuberay-operator
helm install kuberay-operator .

# Step3: Install ray-cluster
cd helm-chart/ray-cluster
helm install ray-cluster .

[Solution]: Set ObjectMeta.Name to an empty string, and use GenerateName to prevent name conflicts.

[Note]: Relationship between Name and GenerateName (Link)

Related issue number

Closes #582

Checks

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • This PR is not tested :(

I tested this PR with the same config for ray-cluster in kevin85421@fe80c75, but used the new image for kuberay-operator. As shown in the screenshot, two workers are created successfully.

截圖 2022-09-22 下午3 06 40

@DmitriGekhtman
Copy link
Collaborator

DmitriGekhtman commented Sep 22, 2022

Looks good. This is the correct action here. Could you add a unit test?

And then it would be great to mention in the Ray docs here https://docs.ray.io/en/latest/cluster/kubernetes/user-guides/config.html#pod-templates that metadata.name and metadata.generateName are ignored.

@kevin85421
Copy link
Member Author

Looks good. This is the correct action here. Could you add a unit test?

And then it would be great to mention in the Ray docs here https://docs.ray.io/en/latest/cluster/kubernetes/user-guides/config.html#pod-templates that metadata.name and metadata.generateName are ignored.

I added a unit test. I opened an issue to update the document in the ray repository.

Copy link
Collaborator

@DmitriGekhtman DmitriGekhtman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@DmitriGekhtman DmitriGekhtman merged commit cbc9b0b into ray-project:master Sep 23, 2022
lowang-bh pushed a commit to lowang-bh/kuberay that referenced this pull request Sep 24, 2023
…oject#587)

Set RayCluster ObjectMeta.Name to an empty string, and use GenerateName to prevent name conflicts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Pod reconciliation fails if worker pod name is supplied
2 participants