fix(kubernetes): wait for pod termination on stop - #2858
Closed
drew wants to merge 1 commit into
Closed
Conversation
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
drew
requested review from
a team,
derekwaynecarr,
mrunalp and
sjenning
as code owners
August 21, 2026 03:09
6 tasks
|
Label |
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.
Summary
Make Kubernetes stop complete only after the backing pod disappears. This closes the lifecycle race where
Suspended=Truecould be published before the old supervisor finished and acknowledged its canonical process exit, allowing an immediate restart to receive the stale exit report.Replaces #2857 with the fix at the compute-driver lifecycle boundary.
Related Issue
No issue required: this is an obvious localized Kubernetes lifecycle race with a focused regression test.
Changes
v1beta1andv1alpha1Sandbox resources.Suspended=False/PodNotOwnedfailures while waiting.Suspended=Trueis insufficient while the pod still exists.Testing
mise run pre-commitpassescargo test -p openshell-driver-kubernetes(209 passed)mise run testwith an isolatedOPENSHELL_SYSTEM_GATEWAY_DIRtest:e2elabel)mise run cifully passes locally: all non-Go lanes passed; Go SDK gateway-list tests read the host default from hard-coded/etc/openshell/gatewaysand failed their empty-directory assertionsChecklist