Skip to content

feat: prefer NVIDIA DPU reset for force restart - #139

Draft
zanezhuNVIDIA wants to merge 1 commit into
mainfrom
feature/nvidia-force-dpu-reset
Draft

zanezhuNVIDIA wants to merge 1 commit into
mainfrom
feature/nvidia-force-dpu-reset

Conversation

@zanezhuNVIDIA

@zanezhuNVIDIA zanezhuNVIDIA commented Sep 3, 2026

Copy link
Copy Markdown

Using the "/redfish/v1/Chassis/BlueField_0/Actions/Oem/NvidiaChassis.Reset" endpoint is the official way for BF4 to do the reset.
The standard redfish ForceRestart method may not work with BF4 DPU.
To handle this situation, the nv-redfish would try to use "/redfish/v1/Chassis/BlueField_0/Actions/Oem/NvidiaChassis.Reset" endpoint first to reset the BF4 DPU if the endpoint exists. If the endpoint does not exist, the nv-redfish would be fallback to standard ForceRestart method.

Summary by CodeRabbit

  • New Features

    • Added NVIDIA DPU force-restart support using the advertised chassis reset action when available.
    • Added automatic fallback to the standard reset operation when the specialized action is unavailable or the matching chassis cannot be found.
    • Added support for recognizing NVIDIA OEM chassis reset actions and their targets.
  • Tests

    • Added coverage for successful NVIDIA force resets, chassis matching, reset-target discovery, and fallback behavior when reset targets are stale or unavailable.

Signed-off-by: Zane Zhu <170476994+zanezhuNVIDIA@users.noreply.github.com>
@copy-pr-bot

copy-pr-bot Bot commented Sep 3, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Enterprise

Run ID: 237468c0-1283-4e25-864c-f35317ca50e0

📥 Commits

Reviewing files that changed from the base of the PR and between 5b3bfb1 and 9eaf5de.

📒 Files selected for processing (16)
  • src/model/chassis.rs
  • src/model/oem/nvidia_openbmc.rs
  • src/nvidia_dpu.rs
  • tests/integration_test.rs
  • tests/mockups/nvidia_dpu_force_reset/redfish/v1/Chassis/BlueField_0/index.json
  • tests/mockups/nvidia_dpu_force_reset/redfish/v1/Chassis/index.json
  • tests/mockups/nvidia_dpu_force_reset/redfish/v1/Managers/index.json
  • tests/mockups/nvidia_dpu_force_reset/redfish/v1/Systems/BlueField_0/index.json
  • tests/mockups/nvidia_dpu_force_reset/redfish/v1/Systems/index.json
  • tests/mockups/nvidia_dpu_force_reset/redfish/v1/index.json
  • tests/mockups/nvidia_dpu_stale_force_reset/redfish/v1/Chassis/BlueField_0/index.json
  • tests/mockups/nvidia_dpu_stale_force_reset/redfish/v1/Chassis/index.json
  • tests/mockups/nvidia_dpu_stale_force_reset/redfish/v1/Managers/index.json
  • tests/mockups/nvidia_dpu_stale_force_reset/redfish/v1/Systems/BlueField_0/index.json
  • tests/mockups/nvidia_dpu_stale_force_reset/redfish/v1/Systems/index.json
  • tests/mockups/nvidia_dpu_stale_force_reset/redfish/v1/index.json

Included review availability: Your plan provides up to 12 included reviews per hour; 10 remain after this review.


📝 Walkthrough

Walkthrough

The change adds NVIDIA OpenBMC chassis reset models and uses advertised chassis targets for DPU ForceRestart. Unsupported or stale targets fall back to the standard computer-system reset path. Unit tests, integration tests, and Redfish mockups cover both paths.

Changes

NVIDIA DPU reset flow

Layer / File(s) Summary
OEM chassis action models
src/model/chassis.rs, src/model/oem/nvidia_openbmc.rs
ChassisActions now exposes optional NVIDIA OEM actions. The new models represent #NvidiaChassis.Reset and its optional target.
DPU force-reset orchestration
src/nvidia_dpu.rs
ForceRestart matches the system and chassis identifiers, reads the OEM reset target, and posts ForceDpuReset. Missing actions and not-found targets use the standard power implementation. Unit tests cover matching and missing-action cases.
Reset-flow integration coverage
tests/integration_test.rs, tests/mockups/nvidia_dpu_force_reset/..., tests/mockups/nvidia_dpu_stale_force_reset/...
Integration tests and Redfish mockups cover the advertised NVIDIA reset target, a stale target, and standard reset fallback.

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

Merge Risk: ⚪ Minimal · up to 9eaf5

Force restart now prefers the advertised NVIDIA DPU reset action and falls back to the standard Redfish reset when unavailable or stale. The covered fallback paths leave no identified merge-blocking risk.

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant ComputerSystem
  participant Chassis
  participant NvidiaReset
  Client->>ComputerSystem: Request ForceRestart
  Client->>Chassis: Find matching chassis
  Chassis-->>Client: Return OEM reset target
  Client->>NvidiaReset: POST ForceDpuReset
  NvidiaReset-->>Client: Return success or not-found
  Client->>ComputerSystem: Use standard reset when unsupported
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 15 functions across 4 files. (12 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: preferring the NVIDIA DPU reset method during force restart.
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.
Full details: Docstring Coverage

Explanation

Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 15 functions across 4 files. (12 skipped: 12 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/nvidia-force-dpu-reset

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

@zanezhuNVIDIA zanezhuNVIDIA self-assigned this Sep 3, 2026
@zanezhuNVIDIA
zanezhuNVIDIA marked this pull request as draft September 10, 2026 22:34
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