Conversation
…e deadlock When all GPUs on a node are occupied, RollingUpdate creates a deadlock: the new pod cannot schedule without a GPU, and the old pod won't terminate until the new pod is Ready. This sets the deployment strategy to Recreate for GPU workloads (gpuCount > 0) so the old pod terminates first, freeing the GPU for the replacement. Fixes #192 Signed-off-by: Christopher Maher <chris@mahercode.io>
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
Recreatefor GPU workloads (gpuCount > 0) to prevent scheduling deadlock during rolling updatesRollingUpdate)Problem
When all GPUs on a node are occupied,
RollingUpdatecreates a deadlock: the new pod cannot schedule without a GPU, and the old pod won't terminate until the new pod is Ready. This is especially common in homelab/small clusters with no spare GPUs.How it works
The fix adds a
Recreatestrategy assignment inside the existingif gpuCount > 0block inconstructDeployment(), alongside the GPU toleration logic. This means the old pod terminates first, freeing the GPU for the replacement pod. Brief downtime during updates is acceptable — the alternative is a permanent deadlock.Existing GPU InferenceService deployments will pick up the fix on the next reconcile cycle.
Fixes #192
Test plan
make testpasses — all existing + new testsstrategy: Recreateviakubectl get deploy <name> -o yamlRollingUpdate