Delete the seed pod an interrupted create leaves holding both PVCs - #12
Merged
Conversation
A completed create deletes its seed pod, so cleanup never looked for one. But an interrupted create leaves the pod behind - Completed, harmless-looking - still mounting both PVCs. Their protection finalizer then waits on it: each PVC delete below times out after ninety seconds, cleanup reports incomplete, and no retry can ever finish, because the one resource blocking everything is the one resource nobody deletes. Found on a real workspace whose deletion failed identically on every attempt. The pod stays out of expectedResources deliberately: verification of a healthy workspace must not demand a pod that a completed create correctly removed. Remove now deletes it explicitly, ownership-verified against the seed role labels, and before the PVCs so the finalizer releases. A foreign pod wearing the seed name is refused and reported, not deleted.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A completed create deletes its seed pod, so cleanup never looked for one. An interrupted create leaves the pod behind - Completed, harmless-looking - still mounting both PVCs. Their protection finalizer waits on it: each PVC delete times out after ninety seconds, cleanup reports incomplete, and no retry can ever finish. Found on a real workspace whose deletion failed identically on every attempt.
The pod stays out of expectedResources deliberately: verification of a healthy workspace must not demand a pod that a completed create correctly removed. Remove now deletes it explicitly, ownership-verified against the seed role labels, and before the PVCs so the finalizer releases. A foreign pod wearing the seed name is refused and reported, not deleted.
Validation: full suite 159 passed / 3 skipped on Windows; two new unit tests cover the leftover-pod deletion order and the foreign-pod refusal.