feat: add hami_gpu_device_health metric to scheduler - #2614
Conversation
DeviceUsage.Health is used internally to skip unhealthy devices in Fit()
but was never emitted as a Prometheus metric. Operators have no way to
alert on an unhealthy GPU without inspecting node annotations manually.
Add hami_gpu_device_health gauge (1=healthy, 0=unhealthy) in
collectNodeMetrics, with label set {node, device_uuid, device_index,
device_type} consistent with hami_gpu_memory_limit_bytes.
Signed-off-by: G. Manoj Kumar <manojkumar148700@gmail.com>
Signed-off-by: manoj-1407 <manojkumar148700@gmail.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: manoj-1407 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe scheduler adds the ChangesGPU device health metrics
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Used Claude to help identify the gap and draft the patch.
I went through the code myself and understand it.
What type of PR is this?
/kind feature
What this PR does / why we need it:
DeviceUsage.Health is set by the device plugin via CheckHealth() and
the scheduler already uses it internally to skip unhealthy devices
during scoring. but it was never exposed as a Prometheus metric — if
a gpu goes unhealthy the only way to catch it is checking node
annotations manually. this adds hami_gpu_device_health as a gauge
(1=healthy, 0=unhealthy) inside collectNodeMetrics, same label set
as hami_gpu_memory_limit_bytes.
Which issue(s) this PR fixes:
Fixes #2612
Special notes for your reviewer:
same 0/1 gauge pattern hami_mig_device_info already uses.
nodeGPUDev
Summary by CodeRabbit
New Features
1) or unhealthy (0) with node, device, and GPU type details.Tests