feat(inspur_legacy): new parser for pre-Kaytus Inspur onekeylog
Older AMI-BMC Inspur onekeylog archives (NF5466M5 / NF5280M5 generation)
opened to an empty result: they carry none of the files the inspur parser
keys on (no asset.json, devicefrusdr.log, selelist.csv or component.log).
New package internal/parser/vendors/inspur_legacy (vendor id inspur_legacy),
separate from inspur:
- binary IPMI FRU decode (FRU.bin) -> board identity
- Inspur_AssetInfoInventory.log -> CPU / memory / PCIe / PSU inventory
- events from Inspur_<model>_<serial>_IDL, sel.log, blackbox.log,
MegaRAID raid0.log, and the flat AMI <severity>.log files
- no live sensors in this archive class -> recorded as a collection error
- BMC clock timestamps before 2010 dropped as un-set (1970 / ~2005 RTC)
Registry: add optional PrioritizedParser { DetectPriority() int } so a
confidence tie is broken by specificity. inspur_legacy returns 10 and also
declines (Detect 0) when modern Kaytus markers are present, so the two
Inspur parsers never fight over a newer dump.
Docs: ADL-065, 06-parsers.md, releases/v1.32.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017VL8wLGD6Lnp6hZCpqT6cZ
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
be37f1852b
commit
3311bafd8e
@@ -8,6 +8,9 @@ Core behavior:
|
||||
- registration uses `init()` side effects
|
||||
- all registered parsers run `Detect()`
|
||||
- the highest-confidence parser wins
|
||||
- a confidence tie is broken by the optional `PrioritizedParser` interface
|
||||
(`DetectPriority() int`, default 0); used so `inspur_legacy` beats the broader
|
||||
`inspur` parser on shared `onekeylog/` archives (see ADL-065)
|
||||
- generic fallback stays last and low-confidence
|
||||
|
||||
`VendorParser` contract:
|
||||
@@ -61,6 +64,7 @@ serial from its socket, model, board serial, or another component; reject source
|
||||
| `h3c_g6` | H3C SDS G6 bundles | Similar flow with G6-specific files |
|
||||
| `hpe_ilo_ahs` | HPE iLO Active Health System (`.ahs`) | Proprietary `ABJR` container with gzip-compressed `zbb` members; parser combines SMBIOS-style inventory strings and embedded Redfish storage JSON |
|
||||
| `inspur` | onekeylog archives (classic `component.log` and per-file `component/*.txt` D-Bus layouts) | FRU/SDR, optional Redis enrichment, normalized IDL/SEL/syslog events (see ADL-056) |
|
||||
| `inspur_legacy` | Legacy AMI-BMC onekeylog (NF5466M5/NF5280M5 gen: `Inspur_AssetInfoInventory.log`, binary `FRU.bin`, `Inspur_*_IDL`, `sel.log`, flat `<sev>.log`) | Binary IPMI FRU decode + text inventory + IDL/SEL/blackbox/MegaRAID/syslog events; no live sensors. Wins the `onekeylog/` detect tie via `DetectPriority`. See ADL-065 |
|
||||
| `lenovo_xcc` | Lenovo XCC mini-log ZIP archives | JSON inventory + platform event logs |
|
||||
| `nvidia` | HGX Field Diagnostics | GPU- and fabric-heavy diagnostic input |
|
||||
| `nvidia_bug_report` | `nvidia-bug-report-*.log.gz` | dmidecode, lspci, NVIDIA driver sections; Xid/SXid GPU error events (see ADL-055, `bible-local/docs/nvidia-bug-report-analysis.md`) |
|
||||
|
||||
@@ -1844,3 +1844,52 @@ FIRMWARE_CHANGED event per import. `cleanFirmwareVersion` now strips a trailing
|
||||
` (...)` from those entries (BIOS then matches the live-CD exactly; BMC
|
||||
`7.11.02` vs the live-CD's IPMI-truncated `7.11` is inherent and left as-is).
|
||||
Test `TestExtractComponentFirmware_StripsBuildStamp`.
|
||||
|
||||
---
|
||||
|
||||
## ADL-065 — Separate parser for the legacy Inspur onekeylog format
|
||||
|
||||
**Date:** 2026-09-02
|
||||
**Context:** A customer NF5466M5 `onekeylog (14).tar` opened to an empty result.
|
||||
The archive is a genuine, complete Inspur onekeylog, but from an older AMI-based
|
||||
BMC generation that predates everything the `inspur` parser keys on: no
|
||||
`asset.json`, no `devicefrusdr.log`, no `selelist.csv`, no `component.log`.
|
||||
Inventory lives in `Inspur_AssetInfoInventory.log` (plain text), FRU in a binary
|
||||
`FRU.bin`, the event log in `Inspur_<model>_<serial>_IDL` plus a pipe-delimited
|
||||
`sel.log`, and BMC syslog in flat `<severity>.log` files at the archive root.
|
||||
The `inspur` parser still detected it at confidence 100 (every path contains
|
||||
`onekeylog/`) and produced nothing.
|
||||
**Decision:**
|
||||
- New package `internal/parser/vendors/inspur_legacy` (vendor id
|
||||
`inspur_legacy`), not a change to `inspur`. It decodes the binary IPMI FRU
|
||||
image, `Inspur_AssetInfoInventory.log` (CPU/memory/PCIe/PSU), the `*_IDL` and
|
||||
`sel.log` event logs, `blackbox.log`, MegaRAID `raid0.log`, and the flat AMI
|
||||
syslog files.
|
||||
- `Detect` returns 0 when any modern-Kaytus marker is present, so the two
|
||||
Inspur parsers never fight over a newer dump.
|
||||
- Added an optional `parser.PrioritizedParser { DetectPriority() int }` interface.
|
||||
`DetectFormat`/`DetectAllFormats` break a confidence tie by priority.
|
||||
`inspur_legacy` returns priority 10; every other parser defaults to 0. This is
|
||||
the only way the more specific parser can win the 100-vs-100 tie against the
|
||||
broader `inspur` parser without editing it.
|
||||
- Product-area FRU serial is treated as the operator-facing system serial
|
||||
(matches ADL for the Kaytus `component_fru.go`); board-area part number wins
|
||||
when the product-area part is the `"0"` placeholder.
|
||||
- Timestamps before 2010 are dropped as un-set BMC clocks (this hardware shipped
|
||||
2018+; alert.log also carries a ~2005 firmware-default RTC in addition to the
|
||||
1970 epoch).
|
||||
**Consequences:**
|
||||
- This archive class now yields full board identity (`NF5466M5` /
|
||||
`221353113` / `YZMB-00882-104`), 2 CPUs, 12 DIMMs, 6 PCIe devices, 2 PSUs,
|
||||
and ~2.9k dated events (PSU0 AC-loss on 2026-05-23, RAID predictive failure /
|
||||
PD medium errors on slot 37 from 2026-08-31).
|
||||
- Sensors are empty by design: SDR.dat holds only definitions and there is no
|
||||
sensor-list capture. Recorded as a `sensors` collection error.
|
||||
- IDL and SEL both describe the same BMC event log; only exact duplicates are
|
||||
collapsed, so some events appear once per source. Cross-source dedup is left
|
||||
for a later iteration.
|
||||
- Tests: `TestDecodeBinaryFRU_*`, `TestParseAssetInfoInventory*`,
|
||||
`TestParseIDLEvents`, `TestParseSELLog`, `TestParseBlackbox`,
|
||||
`TestParseMegaRAIDLog`, `TestParseAMISyslog`, `TestDetect_*`,
|
||||
`TestParse_EndToEnd`, and `TestDetectFormat_PriorityBreaksConfidenceTie` in
|
||||
the `parser` package.
|
||||
|
||||
Reference in New Issue
Block a user