-
Notifications
You must be signed in to change notification settings - Fork 38.9k
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
TPR objects still exist after deleting namespaces #46736
Comments
/area third-party-resource |
/sig cli |
I'd like to take a look at the problem if nobody else is working on this |
@hongchaodeng @deads2k @xingzhou Root Cause of this is the fact that Namespace on ThirdPartyResources is getting ignored (both passed as command --namespace, or the one present in yaml) |
How long has that bug existed? @enisoc might related to your other findings. We know that bug doesn't exist in CRDs (we have tests specifically checking namespace handling), so I'd suggest converting to those as soon as possible. |
@deads2k |
Yes. If the bug has existed for multiple releases (not a regression), I don't think this is a blocker for 1.7. It could still be patched, just not a blocker for the current release. |
Migration to CRD still is not automated and will still take some time. Have you considered that? |
Yes, but if the behavior is not a regression, then this does not block the release. The fact that we have a clear path forward to a working resource is gravy. |
This bug existed in 1.4 (#32306), got fixed in 1.5, but appears again in 1.6 . |
Ok. Not a blocker for 1.7, but if the patch is reasonable as a fix we can merge it into the service stream. For 1.7, I'd still recommend moving to CRD as quickly as possible. |
@deads2k I was able to reproduce this with CRD on master HEAD. What level of tests are there? Anything e2e? |
@enisoc most of them and specifically a storage one. You're saying we have the |
@deads2k No, I don't see any evidence that they always end up in the default namespace (neither for TPR nor CRD). I'm not sure what that's referring to. What I was able to reproduce is the bug described at the top of this issue: Create item in namespace, delete namespace, item remains. I observed this for TPR on |
The problem seems to be that If I fix that, namespace cleanup works for TPR. However, for CRD, now namespace cleanup gets stuck and controller manager logs this:
Edit: To clarify, I "fixed" the check in the linked code by removing the entire highlighted block. It seems like the singular |
Regarding namespace cleanup getting stuck for CRD after the "fix", the error on the apiserver side is:
According to the stack trace, the error comes from here: |
@enisoc, yes, not only the |
Automatic merge from submit-queue (batch tested with PRs 44883, 46836, 46765, 46683, 46050) While deleting a namespace, the TPR instances under this ns should be… … deleted. While deleting a namespace, the TPR instances under this ns should be deleted. Fixed #46736 **Release note**: ``` None ```
I'd like to keep this open until we have a regression test since this is at least the third time we've fixed this. I'll add a test as part of making sure this fix works for CRD. |
Automatic merge from submit-queue (batch tested with PRs 47024, 47050, 47086, 47081, 47013) apiextensions-apiserver: Fix decoding of DeleteOptions. Fixes #47072 by making apiextensions-apiserver capable of decoding unversioned DeleteOptions, rather than only handling Unstructured objects (i.e. Custom Resources). This also closes #46736 and #37554 since the added regression test works for TPR as well.
BUG REPORT
Kubernetes version (use
kubectl version
): v1.6.2Environment:
What happened:
MyResource "a" still exists after ns is deleted.
The text was updated successfully, but these errors were encountered: