Skip to content

fix(bmc-explorer): skip boot options for B4240V BlueField-4#3053

Merged
poroh merged 1 commit into
NVIDIA:mainfrom
poroh:vf-bf4-boot-options-members-null
Jul 1, 2026
Merged

fix(bmc-explorer): skip boot options for B4240V BlueField-4#3053
poroh merged 1 commit into
NVIDIA:mainfrom
poroh:vf-bf4-boot-options-members-null

Conversation

@poroh

@poroh poroh commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Treat B4240V chassis as BlueField-4 so exploration avoids fetching BootOptions when Redfish returns Members: null. Add DGX VR NVL mock support with B4240V metadata to cover the new variant.

Related issues

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

@copy-pr-bot

copy-pr-bot Bot commented Jul 1, 2026

Copy link
Copy Markdown

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.

@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Summary by CodeRabbit

  • New Features

    • Added support for NVIDIA DGX VR NVL hardware in mock environments and exploration flows.
    • Expanded BlueField 4 detection to recognize additional hardware models.
    • Improved generated device details, including chassis, NIC, BIOS, and boot option information for the new hardware variant.
  • Bug Fixes

    • Corrected hardware identification so BlueField 4-based systems are detected more reliably.
    • Updated machine ID generation and discovery output for the new model to match expected DPU behavior.

Walkthrough

Adds a B4240V BlueField4 variant recognized by explorer detection logic and mock hardware, introducing a Mode enum with mode-dependent chassis model, NIC, and part number attributes. Adds a new NvidiaDgxVr host hardware type with a DgxVrNvl mock module, wired through machine_info config routing and test support.

Changes

BlueField4 B4240V and DGX VR NVL

Layer / File(s) Summary
BlueField4 B4240V detection and test
crates/bmc-explorer/src/chassis.rs, crates/bmc-explorer/tests/bluefield4_explore.rs
is_bluefield4 now matches both "B4240" and "B4240V"; adds an async test exploring a B4240V mock and validating report/chassis/machine ID.
Bluefield4 mock Mode enum
crates/bmc-mock/src/hw/bluefield4.rs
Adds public Mode enum (B4240, B4240V) and mode field; chassis model, host_nic(), part_number(), and new model() become mode-dependent.
DgxVrNvl mock hardware module
crates/bmc-mock/src/hw/dgx_vr_nvl.rs, crates/bmc-mock/src/hw/mod.rs
New DgxVrNvl struct builds manager, system (with boot options derived from DPU NICs), chassis, update-service, and discovery Redfish configs; module registered in hw/mod.rs.
NvidiaDgxVr host hardware type and wiring
crates/bmc-mock/src/lib.rs, crates/bmc-mock/src/machine_info.rs
Adds HostHardwareType::NvidiaDgxVr variant with Display/serde/fixed DPU count support; wires it through DPU BlueField3/4 mode selection, dpu_type/bmc_product, and all HostMachineInfo config routing methods via new dgx_vr_nvl() constructor.
Test support helper
crates/bmc-mock/src/test_support/mod.rs
Adds nvidia_dgx_vr_bluefield4_dpu_bmc() helper constructing a mocked MachineInfo::Dpu for NvidiaDgxVr and returning a TestBmcHandle.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
    participant Test as Test/Caller
    participant HMI as HostMachineInfo
    participant DgxVrNvl as DgxVrNvl
    participant BF4 as Bluefield4 (Mode::B4240V)

    Test->>HMI: system_config(callbacks)
    HMI->>HMI: match hardware_type == NvidiaDgxVr
    HMI->>DgxVrNvl: dgx_vr_nvl()
    DgxVrNvl->>BF4: host_nic()
    BF4-->>DgxVrNvl: NIC identity/MAC (B4240V attrs)
    DgxVrNvl->>DgxVrNvl: build boot options (disk + PXE per NIC)
    DgxVrNvl-->>HMI: computer_system::Config
    HMI-->>Test: system_config result
Loading

Possibly related PRs

  • NVIDIA/infra-controller#2902: Modifies the same crates/bmc-mock/src/hw/bluefield4.rs BlueField4 chassis/NIC modeling that this PR builds the B4240V mode on top of.
  • NVIDIA/infra-controller#3044: Interacts with the same is_bluefield4 detection logic modified here for the B4240V hardware model.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 5.26% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately captures the primary fix: handling B4240V BlueField-4 boot option exploration.
Description check ✅ Passed The description matches the code changes and the stated fix for B4240V plus DGX VR NVL mock support.
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.

Treat B4240V chassis as BlueField-4 so exploration avoids fetching
BootOptions when Redfish returns Members: null. Add DGX VR NVL mock
support with B4240V metadata to cover the new variant.

Signed-off-by: Dmitry Porokh <dporokh@nvidia.com>
@poroh poroh force-pushed the vf-bf4-boot-options-members-null branch from 6410a41 to f183a80 Compare July 1, 2026 03:04
@poroh poroh marked this pull request as ready for review July 1, 2026 03:04
@poroh poroh requested a review from a team as a code owner July 1, 2026 03:04

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
crates/bmc-mock/src/hw/dgx_vr_nvl.rs (1)

63-96: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Simplify boot-option construction for the single fixed NIC.

DgxVrNvl always carries exactly one dpu (per the machine_info.rs::dgx_vr_nvl() constructor and fixed_number_of_dpu() == Some(1)), yet the network boot option is built via [&self.dpu.host_nic()].into_iter().enumerate().map(...). This array/enumerate/map indirection adds complexity without benefit, since there is exactly one item to process. Consider building the single boot option directly and chaining it with std::iter::once, mirroring the disk boot option above it.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/bmc-mock/src/hw/dgx_vr_nvl.rs` around lines 63 - 96, The boot option
assembly in DgxVrNvl is overcomplicated for a single fixed NIC, since the
constructor and fixed_number_of_dpu() guarantee only one host NIC exists.
Simplify the network boot-option creation by removing the array/enumerate/map
chain and building that single BootOption directly, then chain it with the
existing std::iter::once disk option so the intent matches the one-device model.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@crates/bmc-mock/src/hw/dgx_vr_nvl.rs`:
- Around line 63-96: The boot option assembly in DgxVrNvl is overcomplicated for
a single fixed NIC, since the constructor and fixed_number_of_dpu() guarantee
only one host NIC exists. Simplify the network boot-option creation by removing
the array/enumerate/map chain and building that single BootOption directly, then
chain it with the existing std::iter::once disk option so the intent matches the
one-device model.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: d368f971-b9f7-4e94-975b-61ee56957a5f

📥 Commits

Reviewing files that changed from the base of the PR and between a2e3f88 and f183a80.

📒 Files selected for processing (8)
  • crates/bmc-explorer/src/chassis.rs
  • crates/bmc-explorer/tests/bluefield4_explore.rs
  • crates/bmc-mock/src/hw/bluefield4.rs
  • crates/bmc-mock/src/hw/dgx_vr_nvl.rs
  • crates/bmc-mock/src/hw/mod.rs
  • crates/bmc-mock/src/lib.rs
  • crates/bmc-mock/src/machine_info.rs
  • crates/bmc-mock/src/test_support/mod.rs

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

🔍 Container Scan Summary

Service Total Critical High Medium Low Other
boot-artifacts-aarch64 3 0 0 3 0 0
boot-artifacts-x86_64 3 0 0 3 0 0
forge-admin-cli-x86_64 302 6 30 114 8 144
machine-validation-runner 765 30 194 283 37 221
machine_validation 765 30 194 283 37 221
machine_validation-aarch64 765 30 194 283 37 221
nvmetal-carbide 765 30 194 283 37 221
TOTAL 3368 126 806 1252 156 1028

Per-CVE detail lives in the per-service grype-* artifacts (JSON + SARIF). Severity counts only — no CVE IDs published here.

@poroh poroh merged commit e8f77e4 into NVIDIA:main Jul 1, 2026
59 checks passed
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.

2 participants