Skip GPU claim-holders that wait for a missing DRA kubelet-plugin #291
All Vouch review confidence checks passed
Residual risk 0.30 = Change Risk (0.75) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.75 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.075
Real PR Conversation Timeline
1 comments
"Review active on #291"
general
weight: 0.35
cdesiniotis
When an upgrade restarts the driver pod while no DRA kubelet-plugin pod is Ready, GPU Operator pods that hold GPU claims cannot finish terminating. The kubelet needs the kubelet-plugin to unprepare their claims, and a new kubelet-plugin pod starts only after the driver is ready. The driver-manager waited for these pods until it timed out, so the driver pod never became ready. Stop waiting for a GPU Operator pod when its containers have stopped, it holds a GPU claim, and no kubelet-plugin pod is Ready. The kubelet unprepares the claims after the kubelet-plugin starts again, unless gpu.deploy.dra-driver is false, which gets its own warning. When the GPU Operator upgrade policy is off, the driver-manager evicts GPU pods itself. That step also leaves these pods out, because it cannot delete DaemonSet pods and fails when it counts them. In the full path, also wait for ComputeDomain IMEX daemon pods before the kubelet-plugin is drained: they use all GPUs through a CDI spec without a GPU claim, and the driver unload fails while they run. A terminating daemon pod whose containers have stopped is not waited for. User pods that hold GPU claims still stop the driver unload.
When the deadlock occurs
All of these must be true:
1. The node uses the DRA stack (GPUCluster) with the driver container. Only the driver container creates
/run/nvidia/validations/.driver-ctr-ready.2. GPU Operator pods on the node hold GPU claims:
nvidia-dra-validator,nvidia-dcgm-exporter-draandnvidia-dcgm-dra.3. The driver pod restarts. The new driver-manager pauses the
nvidia.com/gpu.deploy.*labels and waits for the GPU Operator pods to terminate.4. No kubelet-plugin pod is Ready, and none can become Ready. The
preStophook of the old driver container deleted.driver-ctr-ready, and thedriver-validationinit container of a new kubelet-plugin pod waits for that file.The claim-holders wait for the kubelet-plugin, the kubelet-plugin waits for the driver, and the driver waits for the claim-holders. Without this change, the driver-manager logs
Failed to wait for nvidia-operator-validator to shutdownafter 5 minutes, and the init container starts again with the same result.These events cause the deadlock:
maxUnavailable: 100%, so the DaemonSet controller replaces its pod at once. The deadlock occurs if the upgrade controller restarts the driver pod before the new kubelet-plugin pod passes its init container.nvidia.com/gpu.deploy.dra-driverlabel is set tofalse, and then the driver pod restarts. No kubelet-plugin pod starts until the label istrueagain.When the deadlock does not occur
driver.manager.env. The running kubelet-plugin pod already passed its init container, so it stays Ready. It unprepares the claims, and the driver-manager drains it after the claim-holders..driver-ctr-readystill exists, so the new kubelet-plugin pod becomes Ready.nvidia.com/gpu.deploy.dra-driverlabel (ClusterPolicy nodes). This change does nothing on these nodes.What this change does
waitForPodsToTerminatestops waiting for a pod when all of these are true:1. The node has the
nvidia.com/gpu.deploy.dra-driverlabel.2. The pod is Terminating and is not in a terminal phase.
3. No init, regular, or ephemeral container of the pod is Running.
4. The pod holds a ResourceClaim allocated by
gpu.nvidia.com.5. No kubelet-plugin pod on the node is Ready.
The driver-manager logs a warning for each pod that it stops waiting for, and records the pod UID. If the
gpu.deploy.dra-driverlabel isfalse, the warning says that the pod stays in Terminating until the label istrue. Two later steps leave out the recorded pods:The skip applies to the same-driver path and to the full path (module unload and reload). After the new driver is ready, the driver-manager restores the labels. The new kubelet-plugin pod becomes Ready, the kubelet unprepares the old claims, and the old pods finish terminating. Then the DaemonSets create new pods.
ComputeDomain IMEX daemons
In the full path, the driver-manager also waits for ComputeDomain IMEX daemon pods. It waits after the GPU claim-holder check and before it drains the kubelet-plugin. An IMEX daemon pod uses all GPUs through a CDI spec and holds no GPU claim, so the GPU claim checks do not find it. The daemon pod stops only after the kubelet unprepares the channel claim of its ComputeDomain workload, which can be after the eviction. If the driver-manager unloads the driver while the daemon runs, the unload fails, and the driver-manager starts again.
compute-domain.nvidia.comand has aComputeDomainDaemonConfigin its allocation config.This change does not affect:
Known gap: user pods that hold GPU claims
If no kubelet-plugin pod is Ready, for any reason, when the driver pod restarts, the eviction of user pods with GPU claims cannot finish. The kubelet needs the kubelet-plugin to unprepare their claims before it can remove the pods.
This change does not help when a user pod holds a GPU claim. The same dependency cycle then stops the driver-manager, and the node needs manual action. All of these must be true:
1. The driver pod restarts, and the GPU Operator upgrade controller did not restart it. For example, an administrator deletes the driver pod while the upgrade policy is off. A restart of only the driver container does not run the driver-manager again.
2. The driver-manager takes the full path, because the driver changes or
FORCE_REINSTALListrue. The same-driver path does not evict user pods.3. A user pod with a GPU claim runs on the node.
4. No kubelet-plugin pod is Ready at that time.
The user pod stops, but it stays in Terminating, because the kubelet needs the kubelet-plugin to unprepare its claims. What the driver-manager does next depends on the upgrade policy:
DRAIN_TIMEOUT_SECONDSis 0 by default, so the wait has no time limit.The upgrade controller does not cause this gap. It restarts the driver pod only after the GPU pods are gone, and that needs a Ready kubelet-plugin. If the pods do not go away, the node goes to
upgrade-failed, and the driver continues to run.The gap existed before this change. Without this change, the driver-manager stops earlier, at the wait for the GPU Operator pods.
What fixes it
maxSurgeon the kubelet-plugin DaemonSet. The old kubelet-plugin pod stays Ready until the new pod is available, so the kubelet can unprepare the claims while the driver restarts.nvidia.com/gpu.deploy.dra-driverisfalse. No fix is planned. A driver restart while a workload uses the GPUs and no kubelet-plugin can unprepare its claims is a destructive action, and some manual recovery cannot be avoided:1. Force-delete the stuck user pod.
2. For a ComputeDomain workload, remove the
resource.nvidia.com/computeDomainlabel from the node. The IMEX daemon pod then stops.After the driver is ready, the kubelet-plugin starts, and the kubelet unprepares the remaining claims.
What does not fix it
DRAIN_TIMEOUT_SECONDS). The eviction fails after the timeout, and the init container starts again with the same result.Testing
| # | Trigger |
autoUpgrade| Driver-manager path | Result ||---|---|---|---|---|
| 1 |
helm upgradefrom v26.7.0 to v26.7.2 | true | same driver | Deadlock || 2 | Delete the driver pod, then the kubelet-plugin pod | true | same driver | Deadlock |
| 3 | Case 2 with
FORCE_REINSTALL=true| true | full reinstall | Deadlock || 4 |
helm upgradethat only setsFORCE_REINSTALL=true| true | full reinstall | No deadlock. Only the driver DaemonSet changed. The kubelet-plugin pod stayed Ready and unprepared the claims, so the driver-manager did not skip a pod. || 5 |
helm upgradefrom v26.7.0 to v26.7.2 withFORCE_REINSTALL=true, then delete the driver pod a few minutes later | false | full reinstall | No deadlock. The new kubelet-plugin pod was Ready, so the driver-manager did not skip a pod. The eviction loggedNo GPU pods to delete. Exiting.|| 6 | Set
gpu.deploy.dra-driver=false, then delete the driver pod, withFORCE_REINSTALL=true| false | full reinstall | No deadlock. The driver-manager skipped the same two pods, the eviction loggedNo GPU pods to delete. Exiting., the modules unloaded, and the init container finished on its first run. After the label was set totrue, the kubelet-plugin pod started, the old pods and their claims were removed, and new pods started. |The ComputeDomain IMEX daemon wait has unit tests only. It was not tested on hardware, because that needs a node that can run ComputeDomains.