fix(device): report Enflame GCU and MetaX sGPU nodes unhealthy when devices leave Allocatable #3561
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 · 275 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.336
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #3561"
general
weight: 0.35
archlitchi
What type of PR is this?
/kind bug
What this PR does / why we need it:
Enflame GCU
CheckHealthreadCapacity, and MetaX sGPUCheckHealthonly checked that its node annotation exists. Both stay the same after the device plugin stops, so the node was never reported unhealthy and HAMi kept sending pods to it.Both now use
device.AllocatableHealth(like #3255 did for the other backends): a node is unhealthy when its devices are 0 inAllocatable. Healthy nodes behave as before.Which issue(s) this PR fixes:
Fixes #3555
Special notes for your reviewer:
Tested on a local minikube cluster with a fake device plugin registering
enflame.com/gcuandmetax-tech.com/sgpuwith kubelet. Stopping the plugin makes kubelet keep Capacity and set Allocatable to 0:| | master | this PR |
|---|---|---|
| plugin stopped | new GCU and sGPU pods still scheduled to the node | node cleaned up, pods Pending (
NodeInsufficientDevice) || plugin restarted | scheduled | scheduled again |
Unit tests added for both backends (they fail on master).
make verifyand unit tests with-racepass. No Enflame or MetaX hardware was used, since the check only reads the node object.AI assistance:LLM used for testing and also for PR description.
Does this PR introduce a user-facing change?:
``
release-note
``Enflame GCU and MetaX sGPU nodes are now reported unhealthy when their devices leave the node's Allocatable.
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
Bug Fixes
Improved health reporting for supported accelerator devices when node information or device resources are missing, unavailable, or restored.
Health checks now reflect allocatable device counts and changes in reported device information. Missing node information and zero allocatable devices are reported as unhealthy.
Device status is refreshed when allocatable counts or reported device information change, including when devices become available again; unchanged information does not trigger an unnecessary refresh.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->