Skip to content

Delete the seed pod an interrupted create leaves holding both PVCs - #12

Merged
btriapitsyn merged 1 commit into
mainfrom
fix/cleanup-orphaned-seed-pod
Aug 7, 2026
Merged

Delete the seed pod an interrupted create leaves holding both PVCs#12
btriapitsyn merged 1 commit into
mainfrom
fix/cleanup-orphaned-seed-pod

Conversation

@btriapitsyn

Copy link
Copy Markdown
Collaborator

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.

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.
@btriapitsyn
btriapitsyn merged commit 5dc9ef8 into main Aug 7, 2026
1 check passed
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.

2 participants