[YUNIKORN-3599] Unreserve DRA claims after the pod leaves the cache #1150
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.42) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.42 · 334 lines diff across 4 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.348
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #1150"
general
weight: 0.35
thc1006
Description
Context.unreservelooks up the pod, node and cycle state in the scheduler cache and returns early when one is missing. Deleting a pod removes its cycle state. If a DRA pod is deleted right after Reserve,preBindfails as it should, butunreservealso returns before it calls the DRA plugin's Unreserve. The in-flight allocations that Reserve added are not removed, and the shim keeps counting their devices as allocated.reservenow returns the cycle state it passed to the plugins, and the bind goroutine passes it tounreservewith the pod and the node name. If the plugins did not run, for example because the node was deleted before Reserve, the state is nil and Unreserve is skipped.PredicateManager.Unreservetakes the node name instead of aNodeInfo, because the plugins only use the name. Unreserve now also runs when the node is deleted after Reserve.Type of change
Jira issue
Jira ID : https://issues.apache.org/jira/browse/YUNIKORN-3599
AI Tooling
If an AI tool was used:
Check https://www.apache.org/legal/generative-tooling.html for details.
Generated by Claude Code.
AI helped analyze the bug and write and test the patch.
How has this been tested?
make test_allwas run, and no failures reported.make e2e_testwas run, and no failures reported.TestPostTaskAllocatedWithDRABindingshas new cases that remove the pod or the node from the cache during the pod bind, where Unreserve must still run; on master it does not. Other cases check that Unreserve runs after a failed volume bind, and that it is skipped when the node is gone before Reserve.TestRescheduleOnBindFailure_ClearsStateAndRescheduleschecks that it is skipped for a pod without resource claims, andTestPreBindPluginchecks the node name it gets.The Jira case, a delete right after Reserve, is not in the tests. In a local test where the delete comes in while Reserve runs, Unreserve is called 0 times on master and once with this change.
Questions:
release-noteslabel.