patch(v2.1): discover host NICs through nv-redfish adapter ports - #4832
Conversation
Site Explorer's default nv-redfish path can now find an ordinary host NIC when the System EthernetInterfaces collection has no usable MACs but the chassis NetworkAdapter Ports do. The fallback keeps System interfaces authoritative, prefers standard Port MACs before Lenovo OEM data, and fetches Port links independently so one failed member does not hide valid siblings. This supports NVIDIA#4469 Signed-off-by: Chet Nichols III <chetn@nvidia.com> (cherry picked from commit c79d042)
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
🔐 TruffleHog Secret Scan✅ No secrets or credentials found! Your code has been scanned for 700+ types of secrets and credentials. All clear! 🎉 🕐 Last updated: 2026-08-11 19:24:41 UTC | Commit: d738d66 |
`github.event.before` works for ordinary branch pushes, but `copy-pr-bot` can replace that commit when it rewrites a synthetic PR branch. Resolve the current pull request merge-base and head for every Core and REST synthetic scan instead. - Expected green-run effect: First REST pushes stop scanning repository history; steady-state timing should be effectively unchanged. - What it really buys us: A green secret check proves the current pull request range was resolved and passed to the scanner, even after a rebase or force-push. Tests added! This supports NVIDIA#4786 Signed-off-by: Chet Nichols III <chetn@nvidia.com> (cherry picked from commit e9c13b3)
nv-dmendoza
left a comment
There was a problem hiding this comment.
LGTM, also fixes the truffle scans
> [!IMPORTANT] > This PR cherry-picks commit 1badba5 (#4968) into `release/v2.1`. Lenovo XCC can report usable onboard `ComputerSystem.EthernetInterfaces` while exposing an installed ConnectX NIC only through a linked chassis `NetworkAdapter.Port`. The adapter-Port fetch treated any System MAC as proof that inventory was complete, so the declared NoDpu boot NIC never reached `predicted_machine_interfaces`. So, this keeps the verified Lenovo + `ComputerSystem.Links.Chassis` boundary, but collects adapter Ports as supplemental inventory even when System interfaces exist. Site Explorer still uses System interfaces as Host candidates; it adds a Port MAC alongside them only when that MAC was actually reported by hardware and `ExpectedMachine` declares it as a Host interface. It does not synthesize `EthernetInterfaces`, treat the declaration as an override, or use a Port ID as a boot-interface ID. A refreshed report can now add that MAC to an existing predicted host, keep its boot target MAC-only, and leave already-managed hosts alone. Retained boot metadata is consulted only when a predicted host has no primary, so an unrelated stale record cannot replace a settled primary. ## Related issues This supports #4952 ## 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 - [x] Unit tests added/updated - [x] Integration tests added/updated - [ ] Manual testing performed - [ ] No testing required (docs, internal refactor, etc.) `cargo test -p bmc-explorer -p carbide-site-explorer --lib` and the `zero_dpu` integration tests pass on the branch. ## Additional Notes **One conflict, in `crates/bmc-explorer/src/lib.rs`.** It was the test module's `use super::{...}` list: the incoming side also imports `should_fetch_bf4_chassis_except_irot_nic`, which #4968 does not add and this branch does not have -- it comes from the BlueField-4 IRoT chassis work on `main`. Resolved to this branch's existing names plus #4968's new `should_fetch_supplemental_network_adapter_ports`; nothing else references the BF4 helper here. The rest of the pick applied cleanly. **Prerequisite is already on this branch.** #4968 builds on the adapter-Port fetch from #4534, which landed here in #4832, so `fetch_network_adapter_ports` is present and this is a true follow-on rather than a partial backport. `crates/site-explorer` picks up an `axum` dev dependency; it resolves against this branch's existing workspace pin (`0.8.4`), so no `Cargo.toml` workspace change was needed.
Important
This PR cherry-picks two commits into
release/v2.1:Site Explorer's default nv-redfish path can now find an ordinary host NIC when the System EthernetInterfaces collection has no usable MACs but the chassis NetworkAdapter Ports do. The fallback keeps System interfaces authoritative, prefers standard Port MACs before Lenovo OEM data, and fetches Port links independently so one failed member does not hide valid siblings.
#4788 rides along because it fixes the secret-scan failure this branch hits.
copy-pr-botcan rewrite its synthetic PR branch, sogithub.event.beforeis unusable and TruffleHog falls back to scanning the whole repository -- on this branch that surfaced 117 unrelated findings and failedREST Secret Scan with TruffleHog(and with it therest-ci-passrollup) on every recentrelease/v2.1PR, merged ones included. The resolver computes the current PR's merge-base and head for both Core and REST synthetic scans, so the scan is scoped to this PR's own commits.Related issues
This supports #4469 and #4786
Type of Change
Breaking Changes
Testing
cargo test -p bmc-explorer(30 passed, including the newnetwork_adapter_port_exploresuite) andcargo test -p carbide-site-explorer 'redfish::tests::' --lib(6 passed) pass on the branch.bash .github/ci/test-resolve-pr-scan-range.shpasses, and both workflow files still parse.Additional Notes
#4534 -- three conflicts, all visibility drift.
release/v2.1does not have #4662 (refactor(bmc/console): adopt style guide rules for pub/module visibility), sobmc-explorerhere still usespubwheremainusespub(crate).chassis.rsandnetwork_adapter.rskeep this branch'spuband take only the newfetch_network_adapter_portsmethod andportsfield; #4662 is style-only and is intentionally not pulled in.bluefield3_explore.rsconflicted because #4534's new test anchors directly afterexplore_bluefield3_ignores_invalid_system_interface_mac, which belongs to a different commit that is not on this branch -- only #4534's ownexplore_bluefield3_preserves_oem_mode_and_base_macis added here.#4788 -- one conflict in
.github/workflows/ci.yaml, because this branch already carries #4715's earlier Core-only workaround. Resolved to keep release-specific workflow behavior: #4788's resolver now backs synthetic PR scans in both Core (ci.yaml) and REST (rest-ci.yml), the existing Core tag-scan branch is preserved, and the resolver plus its focused test come along. The surrounding CI steps in that hunk (check-ci-permissions.sh,check-core-ci-permissions.sh,check-stale-ci-permissions.sh,check-ci-concurrency.sh,test_check_ci_gate.py,check_ci_gate.py) are from other commits and reference scripts that do not exist on this branch, so they are deliberately left out -- every script referenced byci.yamlhere resolves.Migration is additive and safe.
20260810143726_index_explored_endpoint_port_macs.sqlsorts after this branch's latest migration (20260731143022), so it appends without disturbing existing checksums. It drops and recreatesexplored_endpoints_mac_addresses_idx, and that index's pre-state is byte-identical onrelease/v2.1andmain(both from20260708172302_squash_snapshot.sql), so the rebuild behaves the same here.No dependency bump needed. The adapter-port support this relies on is already on the branch --
nv-redfishis pinned at0.14.2, matchingmain(via #4785).