← Back to Pull requests

fix(device): report Enflame GCU and MetaX sGPU nodes unhealthy when devices leave Allocatable #3561

Closed
unknown closed this pull request without merging on Dec 04, 2026 05:25 UTC
View on GitHub
unknown unknown commented on Nov 27, 2026 19:13 UTC
Author

What type of PR is this?

/kind bug

What this PR does / why we need it:

Enflame GCU CheckHealth read Capacity, and MetaX sGPU CheckHealth only 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 in Allocatable. 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/gcu and metax-tech.com/sgpu with 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 verify and unit tests with -race pass. 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 -->

Diff: 275 lines (+206 / -69) across 3 files Reviewer: archlitchi Review duration: 9251m
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
0.40
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
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
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 39.6% (MEDIUM) · Higher = larger blast radius
39.6%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 15.6% · Safe to merge
15.6%