fix(parser): support Inspur onekeylog per-file component/*.txt D-Bus layout

Some onekeylog BMC firmware variants split the combined component.log
into per-file D-Bus GetAll transcripts under component/ (e.g.
PowerSupplyInfo.txt, FanInfo.txt), which the inspur parser did not
read, leaving PSU and fan data empty. Add a GETALL block parser and
wire it as a fallback for PSU and fan telemetry when component.log is
absent; document the layout and known gaps in bible-local.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Mikhail Chusavitin
2026-07-23 12:24:17 +03:00
co-authored by Claude Sonnet 5
parent 4ce0251ce4
commit 5677c49998
4 changed files with 298 additions and 2 deletions
+44 -1
View File
@@ -54,7 +54,7 @@ When `vendor_id` and `device_id` are known but the model name is missing or gene
| `h3c_g5` | H3C SDS G5 bundles | INI/XML/CSV-driven hardware and event parsing |
| `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 | FRU/SDR plus optional Redis enrichment |
| `inspur` | onekeylog archives (classic `component.log` and per-file `component/*.txt` D-Bus layouts) | FRU/SDR plus optional Redis enrichment |
| `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 |
@@ -150,6 +150,49 @@ entire internal `zbb` schema.
---
### Inspur / Kaytus (`inspur`)
**Status:** Ready (v2.2). Tested on Inspur NF5468M7 / Kaytus KR4268X2 onekeylog archives.
**Archive format:** onekeylog BMC diagnostic dump. Two known on-disk layouts:
1. Classic layout: top-level `onekeylog/` directory, single combined `component/component.log`
with `RESTful <Section> info:` JSON blocks (PSU, fan, HDD, PCIe, network, ...).
2. Per-file layout (seen on newer/OEM firmware): archive root is `dump_<serial>_<timestamp>/`
(not `onekeylog/`), and `component.log` is absent. Each component is instead dumped separately
under `component/*.txt` as a raw D-Bus `GetAll` transcript: `GETALL <object> OBJect` blocks with
tab-separated `"field"\t"type":"x"\t"data":value` triples. This is not valid JSON and needs its
own line-oriented extraction (`internal/parser/vendors/inspur/component_dbus.go`).
**Detection:** `onekeylog/` path segment, `devicefrusdr.log`, `component/component.log`,
`onekeylog_dreport.log` filename (per-file layout marker), `component/PowerSupplyInfo.txt`
(per-file layout marker), plus `asset.json` content markers (`VersionInfo` + `CpuInfo` +
`MemInfo`).
**Extracted data (current):**
- CPU / Memory / PCIe / Storage inventory from `asset.json` (both layouts)
- FRU + SDR from `devicefrusdr.log` (classic layout)
- PSU inventory: from `component.log`'s `RESTful PSU info:` block (classic layout) or
`component/PowerSupplyInfo.txt` GETALL transcript (per-file layout)
- Fan RPM/PWM sensors: from `component.log`'s `RESTful fan info:` block (classic layout) or
`component/FanInfo.txt` GETALL transcript (per-file layout)
- Redis snapshot enrichment for serials/firmware/telemetry when `redis-dump.rdb` is present
**Known gaps (per-file layout only):**
- `component/NetworkAdapter.txt` and `component/HDDBpListInfo.txt` use a different
`busctl --verbose` object-tree dump (not the GETALL format) and are not currently parsed. NIC
identity/MAC data is still available via PCIe device inventory from `asset.json`, so this is not
a data-loss gap for NICs.
- `component/RAID.txt` mixes formats per RAID controller family (`getLsiStorageCollection`,
`getPMCStorageCollection`); not currently parsed.
**Implementation note:** the same GETALL object name can recur across multiple command sections in
one file with different field subsets (e.g. `Pwm_N` appears once under the FanPWM sensor query
with a real `Value` reading, and again later under FanControl with only a `Target` setpoint).
`parseDBusGetAllObjects` unions fields across recurring object names, first-seen wins per field, so
a later content-free duplicate cannot silently blank out an earlier real reading.
---
### xFusion iBMC Dump / File Export (`xfusion`)
**Status:** Ready (v1.1.0). Tested on xFusion G5500 V7 `tar.gz` exports.
+31
View File
@@ -1198,3 +1198,34 @@ Do not keep parallel report sections, filters, or table renderers in shell JavaS
- Report-level filtering or extra report sections must be implemented in `internal/chart`, not in
`web/static/js/app.js`.
- Removing legacy DOM renderers from the shell is a correctness fix, not a behavior regression.
---
## ADL-047 — Inspur onekeylog per-file `component/*.txt` D-Bus layout is parsed alongside `component.log`
**Date:** 2026-07-23
**Context:** A field dump (`dump_29E201150_20260723-1418.tar.gz`) came from an Inspur/Kaytus
onekeylog BMC that does not produce the combined `component/component.log` the `inspur` parser
expected. Instead it dumps each component separately under `component/*.txt` as raw D-Bus `GetAll`
transcripts (`GETALL <object> OBJect` blocks, tab-separated `"field" "type":"x" "data":value`
triples, not valid JSON). The archive root is also named `dump_<serial>_<timestamp>/` rather than
`onekeylog/`, so path-based detection did not recognize the layout either. As a result PSU and fan
data were silently empty on this archive class even though the source files carried full data.
**Decision:** Treat the per-file `component/*.txt` D-Bus transcript as a second supported onekeylog
layout, not a new vendor. Added `internal/parser/vendors/inspur/component_dbus.go` with a
line-oriented GETALL block parser (`parseDBusGetAllObjects`), wired as a fallback in `parser.go`
when `component.log` is absent: `ParseComponentDirPowerSupply` from `PowerSupplyInfo.txt` and
`ParseComponentDirFan` from `FanInfo.txt`. Extended `Detect()` with `onekeylog_dreport.log` and
`component/powersupplyinfo.txt` markers so this layout is recognized without relying solely on
`asset.json` content markers. GETALL object names can recur across command sections with different
field subsets (e.g. `Pwm_N` under FanPWM has a `Value` reading, the same name under FanControl has
only a `Target` setpoint); fields are unioned across occurrences with first-seen-wins per key so a
later content-free duplicate cannot blank out an earlier real reading.
**Consequences:**
- PSU and fan RPM/PWM telemetry now parse correctly for this onekeylog layout.
- `component/NetworkAdapter.txt`, `component/HDDBpListInfo.txt` (busctl `--verbose` object-tree
dump) and `component/RAID.txt` (mixed per-controller formats) remain unparsed for this layout;
NIC data is not lost since PCIe inventory from `asset.json` already carries NIC model/MAC.
Revisit only if a real archive needs that specific data and asset.json does not cover it.
- Any future component/*.txt GETALL consumer should reuse `parseDBusGetAllObjects` rather than
re-implementing block splitting or field extraction.