fix(collector): stop NVIDIA enrichment from clobbering PCIe status
enrichPCIeWithNVIDIAData unconditionally overwrote dev.Status after collectPCIe() had already flagged a Warning/Critical (e.g. PCIe link speed degraded), so a clean ECC/remap/reset readout silently downgraded that finding back to OK while leaving the stale ErrorDescription behind. Add a severity-ordered merge (OK/Unknown < Warning < Critical) shared via mergeDeviceStatus in contract.go, and route both the NVIDIA status calculation and the driver-unavailable fallback through it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
6c8be629d2
commit
a34e823f82
@@ -88,23 +88,24 @@ func enrichPCIeWithNVIDIAData(devs []schema.HardwarePCIeDevice, gpuByBDF map[str
|
||||
}
|
||||
|
||||
status := statusOK
|
||||
desc := ""
|
||||
if info.ECCUncorrected != nil && *info.ECCUncorrected > 0 {
|
||||
status = statusWarning
|
||||
devs[i].ErrorDescription = stringPtr("GPU reports uncorrected ECC errors")
|
||||
desc = "GPU reports uncorrected ECC errors"
|
||||
}
|
||||
if info.RemapUncorrectable != nil && *info.RemapUncorrectable > 0 {
|
||||
status = statusWarning
|
||||
devs[i].ErrorDescription = stringPtr("GPU has uncorrectable row remap events (bad HBM cell repair scheduled)")
|
||||
desc = "GPU has uncorrectable row remap events (bad HBM cell repair scheduled)"
|
||||
}
|
||||
if info.RemapFailure != nil && *info.RemapFailure {
|
||||
status = statusCritical
|
||||
devs[i].ErrorDescription = stringPtr("GPU row remap failed to commit to InfoROM (XID 64)")
|
||||
desc = "GPU row remap failed to commit to InfoROM (XID 64)"
|
||||
}
|
||||
if info.ResetRequired != nil && *info.ResetRequired {
|
||||
status = statusCritical
|
||||
devs[i].ErrorDescription = stringPtr("GPU requires a reset")
|
||||
desc = "GPU requires a reset"
|
||||
}
|
||||
devs[i].Status = &status
|
||||
mergeDeviceStatus(&devs[i], status, desc)
|
||||
injectNVIDIATelemetry(&devs[i], info)
|
||||
enriched++
|
||||
}
|
||||
@@ -326,8 +327,7 @@ func isNVIDIADevice(dev schema.HardwarePCIeDevice) bool {
|
||||
}
|
||||
|
||||
func setPCIeFallback(dev *schema.HardwarePCIeDevice) {
|
||||
status := statusUnknown
|
||||
dev.Status = &status
|
||||
mergeDeviceStatus(dev, statusUnknown, "")
|
||||
}
|
||||
|
||||
func injectNVIDIATelemetry(dev *schema.HardwarePCIeDevice, info nvidiaGPUInfo) {
|
||||
|
||||
Reference in New Issue
Block a user