exporter: filter Supermicro Redfish device-bound firmware from hardware.firmware
isDeviceBoundFirmwareName did not catch Supermicro FirmwareInventory naming
conventions where a digit follows the type prefix directly ("GPU1 System Slot0",
"NIC1 System Slot0 AOM-DP805-IO") instead of a space. Also missing: "Power supply N",
"NVMeController N", and "Software Inventory" (generic label for all HGX per-component
firmware slots — GPU, NVSwitch, PCIeRetimer, ERoT, InfoROM, etc.).
On SYS-A21GE-NBRT (HGX B200) this caused 29 device-bound entries to leak into
hardware.firmware: 8 GPU, 9 NIC, 1 NVMe, 6 PSU, 4 PCIeSwitch, 1 Software Inventory.
Fix: extend isDeviceBoundFirmwareName with patterns for all four new cases.
Add TestIsDeviceBoundFirmwareName covering both excluded and kept entries.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -735,6 +735,18 @@ func isDeviceBoundFirmwareName(name string) bool {
|
||||
strings.HasPrefix(n, "ssd ") ||
|
||||
strings.HasPrefix(n, "nvme ") ||
|
||||
strings.HasPrefix(n, "psu") ||
|
||||
// Supermicro Redfish FirmwareInventory names "GPU1 System Slot0", "NIC1 System Slot0 ..."
|
||||
// where the number follows immediately after the type prefix (no space separator).
|
||||
(strings.HasPrefix(n, "gpu") && len(n) > 3 && n[3] >= '0' && n[3] <= '9') ||
|
||||
(strings.HasPrefix(n, "nic") && len(n) > 3 && n[3] >= '0' && n[3] <= '9') ||
|
||||
// "NVMeController1" — storage controller bound to an NVMe device slot
|
||||
strings.HasPrefix(n, "nvmecontroller") ||
|
||||
// "Power supply N" — Supermicro PSU firmware (distinct from generic "PSU" prefix)
|
||||
strings.HasPrefix(n, "power supply") ||
|
||||
// "Software Inventory" — generic label used by HGX baseboard for all per-component
|
||||
// firmware slots (GPU, NVSwitch, PCIeRetimer, ERoT, InfoROM, etc.). The useful name
|
||||
// is only in the inventory item Id, not the Name field, so the entry is not actionable.
|
||||
n == "software inventory" ||
|
||||
// HGX baseboard firmware inventory IDs for device-bound components
|
||||
strings.Contains(n, "_fw_gpu_") ||
|
||||
strings.Contains(n, "_fw_nvswitch_") ||
|
||||
|
||||
Reference in New Issue
Block a user