fix(util): invoke PodAllocationFailed on prepareMigAllocations failure #3391
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 309 lines diff across 3 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.343
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #3391"
general
weight: 0.35
blackdragoon26
What type of PR is this?
/kind bug
What this PR does / why we need it
In MIG mode, when "prepareMigAllocationsLocked()" fails (for example, when "findMigUUIDForGI()" cannot resolve a partition UUID due to transient NVML errors or unready partition states during discovery), "Allocate()" previously returned early without invoking "PodAllocationFailed".
Because the failure cleanup callback was bypassed, the node lock could remain held and the pending pod could remain stuck in "DeviceBindAllocating", potentially preventing subsequent allocation attempts on that node from progressing.
This PR fixes the failure-handling path by:
Which issue(s) this PR fixes
Fixes #3386
Does this PR introduce a user-facing change?
No.
Testing
AI Assistance Disclosure
AI tools were used to assist with code analysis, implementation refinement, and review of potential edge cases. The implementation, validation, testing, and final changes were reviewed and verified by the contributor.
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
Bug Fixes
Failed dynamic MIG recovery now marks the pending pod’s allocation as failed before returning the recovery error.
Allocation failure handling now avoids annotation updates and lock operations when pod or node information is missing, preventing errors in these cases.
Allocation errors return an empty response when the pending pod cannot be found or its device annotations cannot be decoded.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->