fix(bmc-explorer): tolerate invalid BlueField system interface MACs - #4757
Conversation
Signed-off-by: Josh P <williamp@nvidia.com>
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
Summary by CodeRabbit
WalkthroughBlueField exploration now treats invalid system-interface MAC addresses as absent while retaining the interface. OOB fallback selection uses the detected BlueField type. An integration test verifies successful exploration and preservation of valid report data. ChangesBlueField MAC handling
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
…VIDIA#4757) Some pre-ingestion BlueField-3 BMC firmware reports non-48-bit values in the `MACAddress` field of enabled ComputerSystem `eth0` and `eth1` interfaces. The `nv-redfish` explorer currently fails the entire endpoint exploration when it encounters one of these values. This prevents host/DPU pairing and blocks ingestion before the normal DPU BMC and NIC firmware update can run. This change treats an invalid MAC as absent only for BlueField ComputerSystem interfaces. It preserves the interface and continues processing valid OOB interfaces, the OEM BaseMAC, pairing serial number, DPU mode, and firmware inventory. Manager interfaces and non-BlueField ComputerSystem interfaces remain strict. A regression test reproduces the failure using an enabled, link-down BF3 `eth0` with a sanitized 20-octet MAC value. It verifies that: - Exploration succeeds. - The invalid `eth0` is retained without a MAC. - The valid OOB MAC is retained. - The OEM BaseMAC and DPU pairing serial remain available. ## Related issues Fixes NVIDIA#4756 Related historical changes: - NVIDIA#465 - NVIDIA#516 ## Type of Change - [ ] **Add** - New feature or capability - [ ] **Change** - Changes in existing functionality - [x] **Fix** - Bug fixes - [ ] **Remove** - Removed features or deprecated functionality - [ ] **Internal** - Internal changes (refactoring, tests, docs, etc.) ## Breaking Changes - [ ] **This PR contains breaking changes** ## Testing - [ ] Unit tests added/updated - [x] Integration tests added/updated - [ ] Manual testing performed - [ ] No testing required (docs, internal refactor, etc.) Passed locally: ```bash cargo fmt --all -- --check cargo test -p bmc-explorer cargo clippy -p bmc-explorer --all-targets -- -D warnings git diff --check ``` Results: - 7 unit tests passed. - 26 integration tests passed. - Crate-level Clippy passed with warnings denied. - Formatting and diff checks passed. The repository-wide check was attempted with: ```bash cargo make --no-workspace clippy-flow ``` It cannot complete on the current macOS host because `libudev-sys` requires `pkg-config` and the Linux `libudev` development package. This PR remains a draft until the same command passes on Linux. ## Additional Notes The change is intentionally limited to MAC conversion for BlueField ComputerSystem interfaces. It does not change manager-interface handling, non-BlueField behavior, Site Explorer configuration, or firmware policy. Signed-off-by: Josh P <williamp@nvidia.com>
Some pre-ingestion BlueField-3 BMC firmware reports non-48-bit values in the
MACAddressfield of enabled ComputerSystemeth0andeth1interfaces.The
nv-redfishexplorer currently fails the entire endpoint exploration whenit encounters one of these values. This prevents host/DPU pairing and blocks
ingestion before the normal DPU BMC and NIC firmware update can run.
This change treats an invalid MAC as absent only for BlueField ComputerSystem
interfaces. It preserves the interface and continues processing valid OOB
interfaces, the OEM BaseMAC, pairing serial number, DPU mode, and firmware
inventory.
Manager interfaces and non-BlueField ComputerSystem interfaces remain strict.
A regression test reproduces the failure using an enabled, link-down BF3
eth0with a sanitized 20-octet MAC value. It verifies that:eth0is retained without a MAC.Related issues
Fixes #4756
Related historical changes:
Type of Change
Breaking Changes
Testing
Passed locally:
cargo fmt --all -- --check cargo test -p bmc-explorer cargo clippy -p bmc-explorer --all-targets -- -D warnings git diff --checkResults:
The repository-wide check was attempted with:
It cannot complete on the current macOS host because
libudev-sysrequirespkg-configand the Linuxlibudevdevelopment package. This PR remains adraft until the same command passes on Linux.
Additional Notes
The change is intentionally limited to MAC conversion for BlueField
ComputerSystem interfaces. It does not change manager-interface handling,
non-BlueField behavior, Site Explorer configuration, or firmware policy.