Skip to content

feat: add support for lenovo gb300s#2753

Merged
krish-nvidia merged 5 commits into
NVIDIA:mainfrom
krish-nvidia:krish/lenovo-gb300
Jun 22, 2026
Merged

feat: add support for lenovo gb300s#2753
krish-nvidia merged 5 commits into
NVIDIA:mainfrom
krish-nvidia:krish/lenovo-gb300

Conversation

@krish-nvidia

@krish-nvidia krish-nvidia commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

This PR adds support for Lenovo-AMI GB300s and bumps libredfish to v0.44.12

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

Related Issue

#4099

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

Signed-off-by: Krish Dandiwala <kdandiwala@nvidia.com>
@krish-nvidia krish-nvidia self-assigned this Jun 22, 2026
@krish-nvidia
krish-nvidia requested a review from a team as a code owner June 22, 2026 16:29
@coderabbitai

coderabbitai Bot commented Jun 22, 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: ae03da67-be33-4101-b2ba-4d46ea292a23

📥 Commits

Reviewing files that changed from the base of the PR and between 907b5c0 and af3333d.

📒 Files selected for processing (1)
  • crates/bmc-explorer/src/chassis.rs
✅ Files skipped from review due to trivial changes (1)
  • crates/bmc-explorer/src/chassis.rs

Summary by CodeRabbit

  • New Features
    • Added support for Lenovo GB300 hardware systems, including host-interface enablement in exploration reports.
    • Enhanced lockdown status detection for Lenovo GB300 using BIOS USB settings and host-interface state.
    • Extended password rotation handling to include Lenovo GB300 systems.
  • Bug Fixes
    • Normalized chassis serial numbers by trimming whitespace.
  • Chores
    • Updated the libredfish dependency to v0.44.12.
  • Tests
    • Added assertions validating Lenovo GB300 lockdown status in exploration report output.

Walkthrough

The pull request introduces LenovoGB300 hardware support by bumping the libredfish dependency to v0.44.12, mapping RedfishVendor::LenovoGB300 to BMCVendor::LenovoAMI, routing it through the existing account-id "2" password rotation path, configuring host-interface discovery in the BMC explorer, and adding a dedicated lockdown status evaluator based on the BIOS USB000 attribute. Additionally, serial numbers in chassis models are normalized through whitespace trimming.

Changes

LenovoGB300 Hardware Support

Layer / File(s) Summary
libredfish bump and vendor/password routing
Cargo.toml, crates/redfish/src/libredfish/conv.rs, crates/site-explorer/src/redfish.rs
Updates the libredfish git tag to v0.44.12, adds RedfishVendor::LenovoGB300 to the BMCVendor::LenovoAMI mapping in bmc_vendor, and extends the set_bmc_root_password match arm so LenovoGB300 uses the existing account-id "2" rotation path.
BMC explorer config and lockdown status
crates/bmc-explorer/src/lib.rs
Adds hw::HwType::LenovoGb300 to nv_generate_exploration_report with need_host_interfaces: true, and introduces a lockdown_status match arm that evaluates USB000 BIOS attribute combined with host-interface state to return Enabled, Disabled, or Partial.
Integration test assertion
crates/bmc-explorer/tests/lenovo_gb300_explore.rs
Imports InternalLockdownStatus and asserts that the GB300 exploration report contains a lockdown status with status == InternalLockdownStatus::Partial.

Serial Number Normalization

Layer / File(s) Summary
Chassis serial number trimming
crates/bmc-explorer/src/chassis.rs
The ExploredChassis::to_model method now trims whitespace from the selected serial number before string allocation, ensuring consistent representation across chassis serialization.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title directly reflects the primary objective of the changeset: adding support for Lenovo GB300s devices.
Description check ✅ Passed The description accurately describes the addition of Lenovo GB300s support and libredfish dependency bump.
Docstring Coverage ✅ Passed Docstring coverage is 83.33% which is sufficient. The required threshold is 80.00%.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
crates/site-explorer/src/redfish.rs (1)

248-255: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

LenovoGB300 is not using the account-id "2" rotation path.

Line 249 currently routes RedfishVendor::LenovoGB300 through change_password(curr_user, ...), while the explicit account-id "2" flow is in the AMI branch. That diverges from this cohort’s intended LenovoGB300 rotation contract and can fail factory-password rotation behavior.

Suggested fix
-            RedfishVendor::LenovoAMI
-            | RedfishVendor::LenovoGB300
+            RedfishVendor::LenovoAMI
             | RedfishVendor::Supermicro
             | RedfishVendor::Dell
             | RedfishVendor::Hpe => {
                 client
                     .change_password(curr_user.as_str(), new_password.as_str())
@@
                     .map_err(map_redfish_error)?;
             }
+            RedfishVendor::LenovoGB300 => {
+                client
+                    .change_password_by_id("2", new_password.as_str())
+                    .await
+                    .map_err(|err| redact_password(err, new_password.as_str()))
+                    .map_err(|err| redact_password(err, curr_password.as_str()))
+                    .map_err(map_redfish_error)?;
+            }
🤖 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/site-explorer/src/redfish.rs` around lines 248 - 255, The
RedfishVendor::LenovoGB300 vendor is currently grouped in a match arm with
LenovoAMI, Supermicro, Dell, and Hpe that calls change_password with the current
user. LenovoGB300 needs separate handling to use the account-id "2" rotation
path instead of the curr_user path. Separate RedfishVendor::LenovoGB300 from the
grouped match arm into its own dedicated match arm and implement it to use the
account-id "2" rotation contract, similar to how the LenovoAMI branch handles
its specialized rotation behavior.
🤖 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.

Outside diff comments:
In `@crates/site-explorer/src/redfish.rs`:
- Around line 248-255: The RedfishVendor::LenovoGB300 vendor is currently
grouped in a match arm with LenovoAMI, Supermicro, Dell, and Hpe that calls
change_password with the current user. LenovoGB300 needs separate handling to
use the account-id "2" rotation path instead of the curr_user path. Separate
RedfishVendor::LenovoGB300 from the grouped match arm into its own dedicated
match arm and implement it to use the account-id "2" rotation contract, similar
to how the LenovoAMI branch handles its specialized rotation behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 51438e88-be25-46df-a244-a34ea7dc2f9d

📥 Commits

Reviewing files that changed from the base of the PR and between c6b49b6 and 5a099ab.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (5)
  • Cargo.toml
  • crates/bmc-explorer/src/lib.rs
  • crates/bmc-explorer/tests/lenovo_gb300_explore.rs
  • crates/redfish/src/libredfish/conv.rs
  • crates/site-explorer/src/redfish.rs

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

lgtm

Comment thread crates/site-explorer/src/redfish.rs Outdated
Comment thread crates/bmc-explorer/src/lib.rs
@github-actions

Copy link
Copy Markdown

Signed-off-by: Krish Dandiwala <kdandiwala@nvidia.com>
@github-actions

github-actions Bot commented Jun 22, 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 264 6 23 99 6 130
machine-validation-runner 714 34 183 266 35 196
machine_validation 714 34 183 266 35 196
nvmetal-carbide 714 34 183 266 35 196
TOTAL 2412 108 572 903 111 718

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

@krish-nvidia
krish-nvidia merged commit 81ce98a into NVIDIA:main Jun 22, 2026
55 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.

3 participants