Skip to content

fix(dpf): fix remaining BF4 DPF inventory and reboot consistency gaps#3845

Merged
bcavnvidia merged 1 commit into
NVIDIA:mainfrom
bcavnvidia:bf4-dpf
Jul 22, 2026
Merged

fix(dpf): fix remaining BF4 DPF inventory and reboot consistency gaps#3845
bcavnvidia merged 1 commit into
NVIDIA:mainfrom
bcavnvidia:bf4-dpf

Conversation

@bcavnvidia

@bcavnvidia bcavnvidia commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

A little clean-up based on recent findings.

Reject incomplete DPF service inventory snapshots when referenced service templates are unavailable, preserving the last-known-good database value.

Make the DPF reboot’s power-on intent durable before issuing or retrying the command, preventing persisted state from diverging from hardware after failures.

Add regression coverage for host-based DPF detection, composite DPU CR naming, inventory preservation, and reboot persistence ordering.

Related issues

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

@copy-pr-bot

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

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The PR makes DPF inventory resolution fail when referenced service templates are missing, adds coverage for atomic inventory persistence, and changes reboot handling so durable On intent is persisted before power-on execution.

Changes

DPF inventory integrity

Layer / File(s) Summary
Strict service-version resolution
crates/dpf/src/sdk.rs, crates/dpf/src/test/sdk_initialization.rs, crates/machine-controller/src/dpf.rs
get_service_versions_for_dpu now returns InvalidState for missing referenced templates, with repository mocks and regression coverage for rejected partial lookups.
Inventory persistence and lookup coverage
crates/api-core/src/tests/dpf/happy_path.rs
Coverage verifies DPU-name derivation, ingestion flags, successful inventory persistence, failed subsequent lookup handling, and preservation of the prior inventory.

DPF reboot intent durability

Layer / File(s) Summary
Durable reboot transition handling
crates/machine-controller/src/handler/dpf.rs
Initial durable On intent bypasses the delay before command execution; inline power-on issuance is removed, and retry limits and logging are updated.
Persisted intent regression coverage
crates/api-core/src/tests/dpf/waiting_for_ready.rs
Reusable durable-state setup and reboot tests verify that On intent persistence occurs before the Redfish power-on command and that controller progression reaches the updated barrier.

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

Sequence Diagram(s)

sequenceDiagram
  participant InventoryReport
  participant API
  participant DPFSDK
  participant TemplateRepository
  participant Database
  InventoryReport->>API: submit inventory
  API->>DPFSDK: resolve DPU service versions
  DPFSDK->>TemplateRepository: fetch referenced templates
  TemplateRepository-->>DPFSDK: complete templates or missing template
  DPFSDK-->>API: versions or InvalidState error
  API->>Database: persist complete inventory only
Loading
sequenceDiagram
  participant Reconciliation
  participant DurableState
  participant DPFHandler
  participant BMC
  Reconciliation->>DPFHandler: process HandleReboot Off
  DPFHandler->>DurableState: persist HandleReboot On intent
  Reconciliation->>DPFHandler: process durable On intent
  DPFHandler->>BMC: issue power On command
  BMC-->>DPFHandler: return power state
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% 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.
Title check ✅ Passed The title clearly summarizes the main DPF inventory and reboot consistency fixes.
Description check ✅ Passed The description matches the changeset and accurately describes the inventory and reboot fixes plus regression coverage.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@bcavnvidia
bcavnvidia marked this pull request as ready for review July 22, 2026 14:36
@bcavnvidia
bcavnvidia requested a review from a team as a code owner July 22, 2026 14:36
@bcavnvidia
bcavnvidia marked this pull request as draft July 22, 2026 14:36
@bcavnvidia
bcavnvidia marked this pull request as ready for review July 22, 2026 15:48
@bcavnvidia
bcavnvidia marked this pull request as draft July 22, 2026 15:48
@bcavnvidia
bcavnvidia marked this pull request as ready for review July 22, 2026 18:47
@bcavnvidia
bcavnvidia merged commit 5a4ea85 into NVIDIA:main Jul 22, 2026
63 checks passed
@bcavnvidia
bcavnvidia deleted the bf4-dpf branch July 22, 2026 19:31
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