Skip to content

fix: Use product_name to identify BF4 DPU.#3978

Open
abvarshney-nv wants to merge 1 commit into
NVIDIA:mainfrom
abvarshney-nv:bf4_identification
Open

fix: Use product_name to identify BF4 DPU.#3978
abvarshney-nv wants to merge 1 commit into
NVIDIA:mainfrom
abvarshney-nv:bf4_identification

Conversation

@abvarshney-nv

Copy link
Copy Markdown
Contributor

Use product_name to identify BF4 DPU. Also avoid dpu reboot if no BIOS operation is touched.

Related issues

#3863

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

@abvarshney-nv
abvarshney-nv requested a review from a team as a code owner July 23, 2026 12:27
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Summary by CodeRabbit

  • Bug Fixes

    • Improved detection of BF4/DPU platform ownership.
    • Enhanced UEFI credential setup handling, including safer recovery when configuration fails.
    • Prevented unnecessary DPU restarts when UEFI password configuration is unavailable.
    • Improved tracking of device convergence after successful credential updates.
  • Documentation

    • Clarified host credential retry behavior.

Walkthrough

BF4/DPU ownership detection now uses DPU topology product data. DPU UEFI setup distinguishes updated, unavailable, and failed credential operations, changing reboot and convergence-record behavior accordingly.

Changes

DPU platform and credential flow

Layer / File(s) Summary
Topology-based BF4 detection
crates/machine-controller/src/handler.rs
is_dpf_managed_bf4 identifies BF4 platforms from the uppercased DPU product name instead of SDK deployment classification.
UEFI result and convergence handling
crates/redfish/src/libredfish/mod.rs, crates/machine-controller/src/handler.rs
DPU UEFI setup returns Ok(Some(_)) for successful password changes, while initialization handles errors, missing BIOS password fields, reboots, and convergence recording separately.

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

Sequence Diagram(s)

sequenceDiagram
  participant DpuMachineStateHandler
  participant RedfishClientPool
  participant DPU
  participant Database
  DpuMachineStateHandler->>RedfishClientPool: uefi_setup(...)
  RedfishClientPool->>DPU: change_uefi_password(...)
  DPU-->>RedfishClientPool: success or error
  RedfishClientPool-->>DpuMachineStateHandler: Ok(Some), Ok(None), or error
  DpuMachineStateHandler->>DPU: trigger_reboot_if_needed on error or update
  DpuMachineStateHandler->>Database: record_device_converged for staged updates
Loading

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: identifying BF4 DPU by product_name.
Description check ✅ Passed The description matches the implemented changes, covering BF4 identification and skipping reboot when no BIOS change is needed.
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.

@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/machine-controller/src/handler.rs`:
- Around line 4295-4298: Update the format string assigned to msg in the
uefi_setup error-handling path to remove the redundant “failed” phrasing, while
preserving the DPU ID and underlying error details.
🪄 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: c48c0228-7a70-410b-88b6-3f8250dc76b9

📥 Commits

Reviewing files that changed from the base of the PR and between 2de970b and 1dff228.

📒 Files selected for processing (2)
  • crates/machine-controller/src/handler.rs
  • crates/redfish/src/libredfish/mod.rs

Comment thread crates/machine-controller/src/handler.rs
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