-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Ansible-Operator] - Unable to deleted namespace when CR of an Ansible operator has a Finalizer #1513
Comments
Hi @estroz, I closed #1503 because I think that it had too many comments that will be not helpful for we are able to address this scenario. Unfortunately, shows that my comments/descriptions there were not clear enough for @rcernich and @jmazzitelli and/or they are facing another issue which should be reported separately. Please, could you add here in this on the respective label? Really thank you for your time and support. |
@camilamacedo86, sorry for the confusion. This issue is not the problem I was describing, but sounds like it is the issue that @jmazzitelli was having. If you want me to create an issue for the problem I was describing, I can do that. As I mentioned in the other issue, the problem I was describing was very difficult to track down the root cause. Once again, sorry for the confusion. |
Hi, @rcernich no problem at all IMHO: It is better we have one issue for each issue :-) How much more clear we be able to provide the info better, easier and faster can be the fix 👍 So, please feel free to raise your scenario in a new issue. Thank you in advance for your understanding and collaboration. |
I believe this is also a problem for Helm-based operators. Custom resources created from Helm CRDs have a |
I believe it is a problem with all operators. Once the delete on the namespace is called, there is nothing that the operator could do. |
HI @shawn-hurley it worked 100% in the Go operator ones. Note that the diff between both is that when it works in Go the operator pod is not removed before the CR/CRD be deleted. I believe that it is the root cause, the operator has been deleted before the CR then it cannot remove the finalizer metadata from it which causes the bug in the ansible ones. |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
/remove-lifecycle stale |
Stale issues rot after 30d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle rotten |
Rotten issues close after 30d of inactivity. Reopen the issue by commenting /close |
@openshift-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Bug Report
oc delete -f deploy/crds/cache_v1alpha1_memcached_cr.yaml
)oc delete project <namespace>
the operator has been deleted before the CR. (the issue is with the cascade/link of the resources generated )What did you do?
What did you expect to see?
The CR + Operator + Namespace be deleted with success.
What did you see instead? Under which circumstances?
The namespace is marked to be deleted, the operator is deleted, but the CR is not which not allows the namespace to be deleted as well and is hanging it.
Reason: The operator has been deleted before the CR then it cannot remove the finalizer metadata from it which causes the bug.
Workarround: manual deletion of the finalizer metadata from the CR which would be made by the operator if it was not deleted first. E.g
oc patch memcached example-memcached -p '{"metadata":{"finalizers": []}}' --type=merge
OR
oc delete -f deploy/crds/cache_v1alpha1_memcached_cr.yaml
Environment
0.8.1
go version go1.12.5 darwin/amd64
Additional context
Following the images to illustrate the bug.
NOTE: Issue opened in order to make clear the scenario/bug raised in #1493
The text was updated successfully, but these errors were encountered: