Skip to content

feat: Adding VR hardware type to BMC explorer#2910

Merged
hakhondzadeh merged 8 commits into
NVIDIA:mainfrom
hakhondzadeh:Nvl72VR
Jun 30, 2026
Merged

feat: Adding VR hardware type to BMC explorer#2910
hakhondzadeh merged 8 commits into
NVIDIA:mainfrom
hakhondzadeh:Nvl72VR

Conversation

@hakhondzadeh

@hakhondzadeh hakhondzadeh commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Adds Vera Rubin (VR) hardware type to bmc explorer. We will need further changes to libredfish and nvredfish for end to end VR compute tray ingestion.

Related issues

(https://jirasw.nvidia.com/browse/FORGE-8111)

Type of Change

  • Add - New feature or capability

Testing:

I used bmc-explorer-cli --mode nv-redfish on a Vera Rubin host BMC and the exploration was successful. Here are some details from the output:

infra-controller % grep -E '"EndpointType"|"Vendor"|"LastExplorationError"' "$FILE"
  "EndpointType": "Bmc",
  "LastExplorationError": null,
  "Vendor": "Nvidia",
infra-controller % grep -B2 '"Model": "VR NVL72"' "$FILE" | grep '"Id"'
      "Id": "System_0",
      "Id": "BMC_0",
      "Id": "Chassis_0",
infra-controller % grep -A4 '"Key": "EmbeddedUefiShell"' "$FILE"
        "Key": "EmbeddedUefiShell",
        "Expected": "Disabled",
        "Actual": "Enabled"
      }
    ]
infra-controller % grep -E 'Pcie6DisableOptionROM' "$FILE" || echo "no GB200 attrs"
no GB200 attrs
infra-controller % grep -oE '"Id": "GPU_[0-9]+"' "$FILE" | sort -u
"Id": "GPU_0"
"Id": "GPU_1"
"Id": "GPU_2"
"Id": "GPU_3"
infra-controller % grep '"LastExplorationError"' "$FILE"

  "LastExplorationError": null,

@copy-pr-bot

copy-pr-bot Bot commented Jun 26, 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 Jun 26, 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: 8cb9ae0b-08f1-4c6a-88bd-ca3d9f19b7a4

📥 Commits

Reviewing files that changed from the base of the PR and between 88f2627 and 82851a7.

📒 Files selected for processing (1)
  • crates/bmc-explorer/src/lib.rs
🚧 Files skipped from review as they are similar to previous changes (1)
  • crates/bmc-explorer/src/lib.rs

Summary by CodeRabbit

  • New Features
    • Added support for the Vera Rubin hardware platform.
    • Added the platform’s expected BIOS attribute set for accurate verification.
  • Bug Fixes
    • Improved hardware classification and vendor/product matching to recognize Vera Rubin.
    • Updated hardware expectations and validation (including secure boot and BIOS settings) for Vera Rubin.
    • Refined boot option verification for Vera Rubin when boot interface details are available.

Walkthrough

Adds Vera Rubin hardware support to bmc-explorer, including a new HwType variant, BIOS attribute definitions, platform detection, PCIe classification, and machine setup validation.

Changes

Vera Rubin Hardware Platform

Layer / File(s) Summary
HwType enum and BIOS attribute definitions
crates/bmc-explorer/src/hw/mod.rs, crates/bmc-explorer/src/hw/vera_rubin.rs
Declares pub mod vera_rubin, adds HwType::VeraRubin, maps it to BMCVendor::Nvidia, extends infinite_boot_enabled_attr() for VeraRubin, and defines EXPECTED_BIOS_ATTRS with TPM, EmbeddedUefiShell, and GpuExposeAsPcie entries.
Platform detection, PCIe, and machine setup integration
crates/bmc-explorer/src/lib.rs
Adds "VR NVL72" detection for HwType::VeraRubin, includes VeraRubin in the HGX GPU chassis-id check, and extends machine_setup_status with VeraRubin-specific BIOS verification and boot-path checks.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 16.67% 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 clearly summarizes the main change: adding the VR hardware type to BMC explorer.
Description check ✅ Passed The description is directly related to the changeset and accurately describes adding Vera Rubin support and the associated validation.
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.

Comment thread crates/bmc-explorer/src/hw/mod.rs Outdated

@martinraumann martinraumann 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.

Can we add a VR scrape-backed mock/test, or link the source for the VR Redfish assumptions this PR relies on?

The new behavior depends on VR-specific details that are not otherwise verifiable in this diff: NVIDIA / VR NVL72 detection, HGX_GPU_ chassis IDs for PCIe discovery, /MAC(...)/IPv4(...)/Uri() boot-option paths, the expected BIOS attrs, and the EmbeddedUefiShell = Disabled infinite-boot polarity.

Without that fixture/source, a wrong chassis prefix or boot path shape could make VR setup validation silently incomplete.

Comment thread crates/bmc-explorer/src/lib.rs Outdated
Comment thread crates/bmc-explorer/src/lib.rs Outdated
@hakhondzadeh

Copy link
Copy Markdown
Contributor Author

Can we add a VR scrape-backed mock/test, or link the source for the VR Redfish assumptions this PR relies on?

The new behavior depends on VR-specific details that are not otherwise verifiable in this diff: NVIDIA / VR NVL72 detection, HGX_GPU_ chassis IDs for PCIe discovery, /MAC(...)/IPv4(...)/Uri() boot-option paths, the expected BIOS attrs, and the EmbeddedUefiShell = Disabled infinite-boot polarity.

Without that fixture/source, a wrong chassis prefix or boot path shape could make VR setup validation silently incomplete.

I tested this change with running bmc-explorer-cli on a VR host BMC and added some of the output in the PR description. This test proves the set of changes in this PR work as expected. As for additional tests with BMC mocks, I think it can be done outside of this PR.

@hakhondzadeh
hakhondzadeh marked this pull request as ready for review June 29, 2026 03:20
@hakhondzadeh
hakhondzadeh requested a review from a team as a code owner June 29, 2026 03:20

@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-explorer/src/lib.rs (1)

194-199: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy lift

Add a scrape-backed regression test for the VR contract.

This change hard-codes the Vera Rubin Redfish signature in three places: product detection ("VR NVL72"), PCIe chassis selection ("HGX_GPU_"), and setup validation (UEFI path/BIOS keys). Without a fixture-backed test, a later refactor can silently reclassify VR as None/Gb200 or drop GPU PCIe discovery without CI catching it. Please add a canned scrape or mock that exercises hw_type(), the PCIe chassis filter, and machine_setup_status() against the VR shape. As per coding guidelines, "Add or update focused tests for bug fixes, shared behavior, API contracts, migrations, and cross-module changes." Based on path instructions, "Prefer findings about behavior, concurrency, resource lifetimes, and missing tests over style-only comments."

Also applies to: 315-319, 877-898

🤖 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-explorer/src/lib.rs` around lines 194 - 199, Add a scrape-backed
regression test for the Vera Rubin contract so future refactors can’t silently
change behavior. Create a canned scrape/mock that exercises hw_type(), the PCIe
chassis selection logic using the chassis.id() prefix check, and
machine_setup_status() against a VR-shaped system. Verify the test covers the
VR-specific detection path, GPU PCIe discovery, and setup validation using the
existing hard-coded VR Redfish signatures.

Sources: Coding guidelines, Path instructions

🤖 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-explorer/src/lib.rs`:
- Around line 194-199: Add a scrape-backed regression test for the Vera Rubin
contract so future refactors can’t silently change behavior. Create a canned
scrape/mock that exercises hw_type(), the PCIe chassis selection logic using the
chassis.id() prefix check, and machine_setup_status() against a VR-shaped
system. Verify the test covers the VR-specific detection path, GPU PCIe
discovery, and setup validation using the existing hard-coded VR Redfish
signatures.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 409c3836-b223-4d45-93e5-375525980df4

📥 Commits

Reviewing files that changed from the base of the PR and between 54a2b7a and d57dc52.

📒 Files selected for processing (3)
  • crates/bmc-explorer/src/hw/mod.rs
  • crates/bmc-explorer/src/hw/vera_rubin.rs
  • crates/bmc-explorer/src/lib.rs

@github-actions

github-actions Bot commented Jun 29, 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.

Comment thread crates/bmc-explorer/src/lib.rs Outdated

@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.

Actionable comments posted: 1

🤖 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.

Inline comments:
In `@crates/bmc-explorer/src/lib.rs`:
- Around line 891-901: The UEFI boot option matching in the boot validation
logic is too strict because it only looks for "/MAC(" inside the device path,
which misses valid paths that start with "MAC(...)/IPv4(...)/Uri()". Update the
predicate in the boot order check around boot_order_first_option and
option.uefi_device_path() so it matches MAC without requiring a leading slash,
and normalize the path and MAC string to a consistent case before comparing.
Keep the existing IPv4 and Uri() checks intact while making the MAC comparison
tolerant of start-of-path device paths.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 6475596f-80a5-4da0-b5cd-cff969dbe425

📥 Commits

Reviewing files that changed from the base of the PR and between 38f6ccf and 88f2627.

📒 Files selected for processing (2)
  • crates/bmc-explorer/src/hw/mod.rs
  • crates/bmc-explorer/src/lib.rs
💤 Files with no reviewable changes (1)
  • crates/bmc-explorer/src/hw/mod.rs

Comment thread crates/bmc-explorer/src/lib.rs
@hakhondzadeh
hakhondzadeh merged commit 84519af into NVIDIA:main Jun 30, 2026
107 of 109 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.

4 participants