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

Fix finalizer typo and re-create manifests #631

Merged

Conversation

AlessandroPomponio
Copy link
Contributor

Why are these changes needed?

These changes address issue #630

When trying to create one of the example RayCluster on OpenShift, it will fail with the operator reporting "cannot set blockOwnerDeletion if an ownerReference refers to a resource you can’t set finalizers on:".

As per https://sdk.operatorframework.io/docs/faqs/#after-deploying-my-operator-why-do-i-see-errors-like-is-forbidden-cannot-set-blockownerdeletion-if-an-ownerreference-refers-to-a-resource-you-cant-set-finalizers-on-, we were able to fix the issue by applying the new role.yaml that is created running make manifests after applying the changes in this PR.

Related issue number

Closes #630

Checks

As mentioned, this PR was tested by applying the contents of the role.yaml file to the kuberay-operator ClusterRole

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

Copy link
Collaborator

@Jeffwan Jeffwan left a comment

Choose a reason for hiding this comment

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

It is indeed a typo! Thanks for the fix! the change looks good to me

@AlessandroPomponio
Copy link
Contributor Author

Just a quick double check @Jeffwan - I see the consistency check for the helm chart rbac is failing. Is that supposed to happen due to the changes?
Just to make sure everything is correct.

Thanks a lot in advance.
Alessandro

@kevin85421
Copy link
Member

kevin85421 commented Oct 12, 2022

Just a quick double check @Jeffwan - I see the consistency check for the helm chart rbac is failing. Is that supposed to happen due to the changes? Just to make sure everything is correct.

Thanks a lot in advance. Alessandro

I will check the consistency check.

@AlessandroPomponio

RBAC YAML files in helm-chart/kuberay-operator/templates and ray-operator/config/rbac should be synchronized. Hence, you also need to update the RBAC files in helm-chart/kuberay-operator/templates. You can check: (1) DEVELOPMEND.md (2) GitHub Actions for more details.

@DmitriGekhtman
Copy link
Collaborator

RBAC files in the Helm charts need to be updated manually.
Specifically, the following file needs the same fix:
https://github.com/ray-project/kuberay/blob/master/helm-chart/kuberay-operator/templates/role.yaml

Once that's done, you can run python ../scripts/rbac-check.py from the root of KubeRay repo to verify that things are correctly synced.
We were unfortunately unable to automate this syncing process.

See https://github.com/ray-project/kuberay/blob/master/ray-operator/DEVELOPMENT.md#consistency-check

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.

Match up Helm roles to get the helm rbac consistency check to pass.

@AlessandroPomponio
Copy link
Contributor Author

Thank you both @kevin85421 and @DmitriGekhtman for being so kind and pointing me towards the right direction.

From the docs I had imagined something had to be done but I didn't understand they had to be synchronized manually, I assumed there was an automated process in place (and that I had missed some command). Maybe it could help new users if it was made more explicit in the docs 😃

@kevin85421
Copy link
Member

Thank you both @kevin85421 and @DmitriGekhtman for being so kind and pointing me towards the right direction.

From the docs I had imagined something had to be done but I didn't understand they had to be synchronized manually, I assumed there was an automated process in place (and that I had missed some command). Maybe it could help new users if it was made more explicit in the docs 😃

Good idea! I will update the doc. Thank you for pointing this out!

@DmitriGekhtman
Copy link
Collaborator

Thank you both @kevin85421 and @DmitriGekhtman

...I failed to read the comment thread, sorry for the redundant info :)

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.

Thank you!

This is not the first time we've burned ourselves with singular vs. plural in rbac...

@DmitriGekhtman DmitriGekhtman merged commit 389ba00 into ray-project:master Oct 13, 2022
lowang-bh pushed a commit to lowang-bh/kuberay that referenced this pull request Sep 24, 2023
These changes address issue ray-project#630

When trying to create one of the example RayCluster on OpenShift, it will fail with the operator reporting "cannot set blockOwnerDeletion if an ownerReference refers to a resource you can’t set finalizers on:".

As per https://sdk.operatorframework.io/docs/faqs/#after-deploying-my-operator-why-do-i-see-errors-like-is-forbidden-cannot-set-blockownerdeletion-if-an-ownerreference-refers-to-a-resource-you-cant-set-finalizers-on-, we were able to fix the issue by applying the new role.yaml that is created running make manifests after applying the changes in this PR.
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] Operator is unable to create RayClusters on OpenShift due to RBAC
4 participants