Skip to content

fix(site-explorer): discover host NICs through adapter ports - #4439

Merged
chet merged 1 commit into
NVIDIA:mainfrom
chet:gh-issue-4436
Jul 31, 2026
Merged

fix(site-explorer): discover host NICs through adapter ports#4439
chet merged 1 commit into
NVIDIA:mainfrom
chet:gh-issue-4436

Conversation

@chet

@chet chet commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Lenovo XCC can leave Systems/.../EthernetInterfaces without a usable MAC while still publishing the installed host NIC under Chassis/.../NetworkAdapters/.../Ports. Site Explorer therefore misses the NIC MAC and cannot create the zero-DPU predicted interface that DHCP/PXE uses to recognize the host.

This updates libredfish to v0.46.2 and uses adapter-port MACs as a best-effort fallback when an ordinary host has no MAC-bearing System EthernetInterface. Port identifiers remain unset because Port.Id is not a firmware boot-interface selector, leaving port-only discoveries on the existing MAC-based boot path.

Normal System inventory remains preferred, and DPU, switch, and power-shelf exploration does not use this fallback.

Related issues

This supports #4436.

Type of Change

  • Add - New feature or capability
  • Change - Changes in existing functionality
  • 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
  • Integration tests added/updated
  • Manual testing performed
  • No testing required (docs, internal refactor, etc.)

Additional Notes

The end-to-end report test verifies that a MAC found only through an adapter Port is retained as a MAC-only interface. Additional table-driven coverage verifies the fallback gate, System-interface precedence, and invalid simulator port identifiers.

Validated with the full Site Explorer unit-test suite, workspace clippy, custom carbide lints, nightly formatting, dependency policy checks, license checks, and dependency bans.

Closes #4436

@chet
chet requested a review from a team as a code owner July 31, 2026 16:18
@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 18af9f81-9c03-4cc7-8649-2e42299fd229

📥 Commits

Reviewing files that changed from the base of the PR and between 6216346 and 98c8bf4.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (4)
  • Cargo.toml
  • crates/admin-cli/src/redfish/cmds.rs
  • crates/redfish/src/libredfish/test_support.rs
  • crates/site-explorer/src/redfish.rs
🚧 Files skipped from review as they are similar to previous changes (4)
  • Cargo.toml
  • crates/admin-cli/src/redfish/cmds.rs
  • crates/site-explorer/src/redfish.rs
  • crates/redfish/src/libredfish/test_support.rs

Summary by CodeRabbit

  • New Features

    • Network discovery now identifies host and DPU systems more accurately.
    • Host network interfaces can be discovered through physical network-adapter ports when system-level MAC addresses are unavailable.
    • Discovered interfaces are merged while preserving existing interface information.
    • Additional fallback support improves DPU base-MAC detection.
  • Bug Fixes

    • Port speed values now display correctly when reported as fractional gigabits per second.
    • Invalid network-port requests now return clear errors instead of empty results.

Walkthrough

The Redfish simulator now exposes configurable system identifiers and network-adapter port MAC addresses. Site exploration discovers eligible host ports, merges unique MAC-only interfaces, and preserves existing system interfaces. The workspace updates libredfish to v0.46.2.

Changes

Adapter-port discovery

Layer / File(s) Summary
Simulator port data contract
crates/redfish/src/libredfish/test_support.rs
The simulator supports configurable system identifiers and port MAC addresses. It exposes adapter links, enumerates indexed ports, and returns GenericError for invalid port IDs.
Host port discovery and interface merge
crates/site-explorer/src/redfish.rs
Site exploration classifies systems, gates port discovery for hosts without system-interface MACs, applies the BF4 DPU MAC fallback, converts port MAC addresses to MAC-only interfaces, and preserves existing interfaces when MAC addresses duplicate.
Discovery validation and compatibility updates
crates/site-explorer/src/redfish.rs, Cargo.toml, crates/admin-cli/src/redfish/cmds.rs
Tests cover discovery gating, error isolation, simulator port errors, and interface precedence. The libredfish tag changes to v0.46.2, and the port speed fallback uses 0.0.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant SiteExplorer
  participant RedfishSim
  participant NetworkAdapter
  participant ComputerSystem
  SiteExplorer->>RedfishSim: Fetch system classification
  RedfishSim-->>SiteExplorer: Return host or DPU metadata
  SiteExplorer->>RedfishSim: Fetch chassis and adapter link
  RedfishSim-->>SiteExplorer: Return chassis data
  SiteExplorer->>NetworkAdapter: Enumerate ports
  NetworkAdapter-->>SiteExplorer: Return port identifiers
  SiteExplorer->>NetworkAdapter: Fetch port MAC addresses
  NetworkAdapter-->>SiteExplorer: Return MAC-only interfaces
  SiteExplorer->>ComputerSystem: Merge unique interfaces
Loading

Possibly related issues

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: discovering host NICs through network-adapter ports.
Description check ✅ Passed The description accurately explains the host NIC discovery fix, fallback behavior, scope, testing, and dependency update.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@chet

chet commented Jul 31, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai full_review, thanks!

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

@chet: I will perform a complete review of PR #4439.

🐇

✅ Action performed

Full review finished.

@chet chet changed the title Discover Host NICs Through Redfish Adapter Ports fix(site-explorer): discover host NICs through adapter ports Jul 31, 2026
@chet
chet enabled auto-merge (squash) July 31, 2026 17:57
@chet
chet disabled auto-merge July 31, 2026 19:04
@github-actions

Copy link
Copy Markdown

Lenovo XCC can leave Systems/.../EthernetInterfaces empty while still publishing the installed NIC under Chassis/.../NetworkAdapters/.../Ports. In that case Site Explorer never saw the NIC MAC, so the zero-DPU host had no predicted interface for DHCP/PXE to recognize.

Update libredfish to v0.46.2 and use adapter-port MACs when an ordinary host has no MAC-bearing System EthernetInterface. Port.Id remains unset because it is not a firmware boot-interface selector, leaving port-only discoveries on the existing MAC-based boot path.

Port discovery is host-only and best-effort, so normal inventory incurs no additional requests and a broken optional collection does not block BMC exploration. ExpectedMachine interfaces retain their existing expected-inventory and missing-Redfish fallback behavior.

Tests added!

This supports NVIDIA#4436

Signed-off-by: Chet Nichols III <chetn@nvidia.com>
@chet
chet enabled auto-merge (squash) July 31, 2026 23:59
@chet
chet merged commit ffc1bd4 into NVIDIA:main Jul 31, 2026
64 checks passed
@chet
chet deleted the gh-issue-4436 branch August 1, 2026 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Discover Host NICs Through Redfish Adapter Ports

2 participants