fix(parser): expose NVIDIA HGX tray/baseboard identity separately from vendor carrier FRU

Inspur/Kaytus onekeylog dumps only exposed the mechanical carrier FRU serial
(component/fru.txt Board Product) as board identity. That serial doesn't
change when the actual NVIDIA HGX baseboard (SXM+NVSwitch "delta board") is
swapped, causing false "board unchanged" conclusions. Parse the real HGX
tray/baseboard Model/PartNumber/SerialNumber triples from
HGX_HWInfo_FWVersion.log into a new HardwareConfig.HGX field, and normalize
Redfish's NA/N-A placeholders to empty across HGX identity parsing.

Closes #21

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-29 10:30:54 +03:00
co-authored by Claude Sonnet 5
parent f9d328b5cf
commit 586ac782b2
5 changed files with 235 additions and 3 deletions
+35
View File
@@ -1284,3 +1284,38 @@ dropping inventory a diagnostic case (intermittent GPU PCIe dropout) depended on
no acceptance case depended on them yet.
- Any future ipmitool-text-output fallback (FRU/sensor/sdr) should extend
`component_fallback.go` rather than adding another one-off parser.
## ADL-049 — HGX tray/baseboard identity is a distinct entity from the vendor mechanical-carrier FRU
**Date:** 2026-07-29
**Context:** Issue #21 (Inspur/Kaytus HGX B200 dumps). `hw.BoardInfo`/vendor FRU (`component/fru.txt`
`Board Product : CA`, a `YZCA-*` part) identifies the mechanical carrier/tray shipped by Inspur —
it's bolted to the chassis and does not change when the actual NVIDIA HGX baseboard ("delta
board", SXM+NVSwitch) is swapped. Three dumps from the same server showed the CA carrier serial
constant across all three while the NVIDIA-assigned tray (`699-26612-*`) and baseboard
(`935-26287-*`) serials — read from `log/bmc/oem-commer-log/HGX_HWInfo_FWVersion.log` — stayed
identical between dumps A/B (~4 weeks apart) and both changed together in dump C, i.e. only
`HGX_HWInfo_FWVersion.log` actually reflects a baseboard swap.
**Decision:**
- Added `models.HGXIdentity` (`Tray`, `Baseboard`, each a `Model`/`PartNumber`/`SerialNumber`
triple) as `HardwareConfig.HGX`, populated by `parseHGXIdentity` in
`internal/parser/vendors/inspur/hgx_hwinfo.go` from the same `HGX_HWInfo_FWVersion.log` file
already used for GPU assembly/firmware enrichment.
- The log is a sequence of `# curl ... <redfish-path>` comment lines each followed by that
request's JSON response; `splitCurlBlocks` chunks on the comment lines so fields are attributed
to the path that produced them (classified by `tray`/`baseboard` substring, order-independent
field regexes — unlike the existing fixed-order `reHGXGPUBlock` regex for GPU assembly). Paths
containing `gpu_sxm` or `/processors/` are explicitly excluded so a per-GPU triple can never be
misattributed to the tray/baseboard entity.
- `hgxValue()` normalizes Redfish's `NA`/`N/A` placeholder (seen when GPUs are unpowered but the
baseboard itself still responds) to empty string, applied to both the new identity parser and
the existing per-GPU assembly parser, so `"NA"` never leaks into a serial/model/part field.
- Deliberately left `hw.BoardInfo`/vendor FRU parsing (`fru.go`) unchanged — it is not wrong, just
a different entity (mechanical carrier). Consumers that need "did the actual GPU board change"
must compare `HardwareConfig.HGX`, not `BoardInfo`.
**Consequences:**
- Dump-to-dump baseboard/tray swap detection (issue #21's P2) is now possible by comparing two
`HardwareConfig.HGX` values; not yet wired into any diff/comparison UI.
- GPU-status "baseboard responds, GPU not readable" surfacing (P1) is a natural follow-on now that
GPU fields normalize through the same `NA`-aware path, but no dedicated event/diagnostic was
added yet — deferred, no acceptance case depended on it.