Skip to content

fix: support SMC ARS-221GL-FNB-NC24B#3675

Draft
krish-nvidia wants to merge 1 commit into
NVIDIA:mainfrom
krish-nvidia:new-gg-smc
Draft

fix: support SMC ARS-221GL-FNB-NC24B#3675
krish-nvidia wants to merge 1 commit into
NVIDIA:mainfrom
krish-nvidia:new-gg-smc

Conversation

@krish-nvidia

Copy link
Copy Markdown
Contributor

This PR:

  • Detects Supermicro MGX C2 systems from the NVIDIA PG535/2G535 processor module.
  • Skips KCS exploration because MGX C2 uses SSIF.
  • Checks IPMIHostInterface when available and evaluate Supermicro lockdown consistently with libredfish.
  • Preserves the ARS-121L-DNR HostInterface PXE exception.

The libredfish version needs to be bumped once the following PR is merged: NVIDIA/libredfish#106

Related issues

#3623

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

Signed-off-by: Krish Dandiwala <kdandiwala@nvidia.com>
@krish-nvidia krish-nvidia self-assigned this Jul 17, 2026
@copy-pr-bot

copy-pr-bot Bot commented Jul 17, 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 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Summary by CodeRabbit

  • New Features

    • Added automatic detection for NVIDIA MGX-C2 systems based on hardware identifiers.
    • Improved Supermicro management and lockdown handling for MGX-C2 systems.
    • Lockdown status now considers the enabled state of the in-band host interface where applicable.
  • Bug Fixes

    • Adjusted management interface selection to avoid enabling unnecessary Supermicro KCS access on MGX-C2 systems.
    • Improved lockdown classification for supported hardware configurations.

Walkthrough

The change adds MGX-C2 chassis classification based on NVIDIA hardware identifiers and integrates the result into Supermicro exploration configuration and lockdown status evaluation using the in-band IPMI host-interface state.

Changes

MGX-C2 Supermicro lockdown handling

Layer / File(s) Summary
MGX-C2 chassis detection
crates/bmc-explorer/src/chassis.rs
ExploredChassisCollection identifies NVIDIA processor modules whose model starts with PG535 or whose part number contains 2G535; unit tests cover positive and negative combinations.
Supermicro exploration and lockdown flow
crates/bmc-explorer/src/lib.rs
The exploration report derives is_mgx_c2, disables the OEM KCS interface requirement for MGX-C2 systems, and evaluates Supermicro lockdown using ipmi_host_interface_enabled for the in-band state.

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

Sequence Diagram(s)

sequenceDiagram
  participant nv_generate_exploration_report
  participant ExploredChassisCollection
  participant manager_Config
  participant lockdown_status
  nv_generate_exploration_report->>ExploredChassisCollection: call is_mgx_c2()
  ExploredChassisCollection-->>nv_generate_exploration_report: return is_mgx_c2
  nv_generate_exploration_report->>manager_Config: set need_oem_supermicro_kcs_interface to !is_mgx_c2
  nv_generate_exploration_report->>lockdown_status: pass is_mgx_c2 and system model state
  lockdown_status-->>nv_generate_exploration_report: compute Supermicro lockdown status
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main change: fixing support for the Supermicro ARS-221GL-FNB-NC24B platform.
Description check ✅ Passed The description accurately summarizes the MGX C2 detection, KCS skip, lockdown logic, and host-interface exception changes.
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.

@krish-nvidia

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@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 668-703: Add table-driven tests for the lockdown status logic
around the MGX-C2 and Supermicro model branches, covering
ipmi_host_interface_enabled values Some(true), Some(false), and None for both
ARS-121L-DNR and a normal Supermicro model. Assert the resulting
InternalLockdownStatus and externally reported message/state, including the
ARS-121L-DNR PXE host-interface exception.
🪄 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: c73e4cbf-599d-4418-8539-ffdec1009a7e

📥 Commits

Reviewing files that changed from the base of the PR and between dbb6f2b and f2c638e.

📒 Files selected for processing (2)
  • crates/bmc-explorer/src/chassis.rs
  • crates/bmc-explorer/src/lib.rs

Comment on lines +668 to +703
let ipmi_host_interface_enabled = system
.raw()
.ipmi_host_interface
.as_ref()
.and_then(|interface| interface.service_enabled);
let message = format!(
"SysLockdownEnabled={is_syslockdown}, kcs_privilege={kcs_privilege:#?}, host_interface_enabled={hi_enabled}"
"SysLockdownEnabled={is_syslockdown}, kcs_privilege={kcs_privilege:#?}, \
host_interface_enabled={hi_enabled}, \
ipmi_host_interface_enabled={ipmi_host_interface_enabled:?}"
);

let model = system.hardware_id().model.map(|v| v.into_inner());
if model == Some("ARS-121L-DNR") {
// Grace-Grace SMCs (ARS-121L-DNR):
// 1. Need host_interface enabled even with lockdown
// 2. Doesn't provide KCSInterface
match (hi_enabled, is_syslockdown) {
(true, true) => Ok(InternalLockdownStatus::Enabled),
(true, false) => Ok(InternalLockdownStatus::Disabled),
_ => Ok(InternalLockdownStatus::Partial),
}
let is_ars_121l_dnr = model == Some("ARS-121L-DNR");
let (inband_locked, inband_unlocked) = if is_mgx_c2 {
(
ipmi_host_interface_enabled.is_none_or(|enabled| !enabled),
ipmi_host_interface_enabled.is_none_or(identity),
)
} else {
match (hi_enabled, kcs_privilege, is_syslockdown) {
(false, Some(SupermicroPrivilege::Callback), true) => {
Ok(InternalLockdownStatus::Enabled)
}
(true, Some(SupermicroPrivilege::Administrator), false) => {
Ok(InternalLockdownStatus::Disabled)
}
(true, None, false) => Ok(InternalLockdownStatus::Disabled),
_ => Ok(InternalLockdownStatus::Partial),
}
}
.map(|status| Some(LockdownStatus { status, message }))
(
kcs_privilege == Some(SupermicroPrivilege::Callback),
kcs_privilege.is_none()
|| kcs_privilege == Some(SupermicroPrivilege::Administrator),
)
};
// ARS-121L-DNR must keep HostInterface enabled to PXE boot.
let host_interface_locked = hi_enabled == is_ars_121l_dnr;

let status = if is_syslockdown && inband_locked && host_interface_locked {
InternalLockdownStatus::Enabled
} else if !is_syslockdown && inband_unlocked && hi_enabled {
InternalLockdownStatus::Disabled
} else {
InternalLockdownStatus::Partial
};
Ok(Some(LockdownStatus { status, message }))

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.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

ast-grep outline crates/bmc-explorer/src/lib.rs --items all --type function

rg -n -C 4 -g '*.rs' \
  'lockdown_status|is_mgx_c2|ipmi_host_interface|ARS-121L-DNR' \
  crates/bmc-explorer

Repository: NVIDIA/infra-controller

Length of output: 15008


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Map the lockdown_status implementation and any tests in the same file.
ast-grep outline crates/bmc-explorer/src/lib.rs --match lockdown_status --view expanded

# Inspect the surrounding test module if present.
rg -n -C 6 'mod tests|lockdown_status|InternalLockdownStatus|ARS-121L-DNR|is_mgx_c2' crates/bmc-explorer/src/lib.rs

# Look for dedicated lockdown-status test cases anywhere in bmc-explorer tests.
rg -n -C 3 'lockdown status|lockdown_status|InternalLockdownStatus::(Enabled|Disabled|Partial)|ARS-121L-DNR|MGX-C2|host_interface' crates/bmc-explorer/tests crates/bmc-explorer/src

Repository: NVIDIA/infra-controller

Length of output: 34347


Add table-driven coverage for the Supermicro lockdown matrix. Cover MGX-C2 with ipmi_host_interface_enabled set to Some(true), Some(false), and None, and include both ARS-121L-DNR and a normal Supermicro model so the PXE exception and externally reported lockdown state stay correct.

🤖 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 668 - 703, Add table-driven
tests for the lockdown status logic around the MGX-C2 and Supermicro model
branches, covering ipmi_host_interface_enabled values Some(true), Some(false),
and None for both ARS-121L-DNR and a normal Supermicro model. Assert the
resulting InternalLockdownStatus and externally reported message/state,
including the ARS-121L-DNR PXE host-interface exception.

Source: Coding guidelines

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.

1 participant