Skip to content

fix: Introduce delay after power Off in dpf handling.#3906

Merged
abvarshney-nv merged 1 commit into
NVIDIA:mainfrom
abvarshney-nv:minor_issue
Jul 23, 2026
Merged

fix: Introduce delay after power Off in dpf handling.#3906
abvarshney-nv merged 1 commit into
NVIDIA:mainfrom
abvarshney-nv:minor_issue

Conversation

@abvarshney-nv

Copy link
Copy Markdown
Contributor

Due to enqueue based event handling, On is triggered immediately after Off while chassis is not able to process Off completely. So this time delay is needed.

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

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

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Summary by CodeRabbit

  • Bug Fixes
    • Improved reboot handling by consistently applying the configured power-transition delay.
    • Updated reboot progress behavior so completion proceeds correctly after the device is powered on and the required delay has elapsed.
    • Clarified status reporting while waiting for the power transition.

Walkthrough

The DPF reboot handler now applies the configured power-transition delay unconditionally through the timestamp-based wait check before completing the On transition. Its transition documentation was updated to reflect the resulting WaitingForReady path.

Changes

DPF reboot state machine

Layer / File(s) Summary
Apply power-transition delay consistently
crates/machine-controller/src/handler/dpf.rs
The On transition documentation now describes waiting for the observed power state and configured delay. The handler removes the initial-On special case and returns the existing wait outcome whenever the timestamp-based delay gate is active.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • NVIDIA/infra-controller#3845: Updates DPF reboot tests around persisted On intent and Power(On) command ordering, which relates to this PR’s reboot timing behavior.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly states the main change: adding a post-off delay in DPF handling.
Description check ✅ Passed The description matches the change and explains why the off-to-on delay 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/dpf.rs`:
- Around line 328-333: Scope the wait gate around super::wait to the
PerformPowerOperation::On branch in the handler’s operation match, so only On
transitions return the waiting outcome during the Off→On delay. Ensure the Off
branch reads the current power state and can issue ForceOff without being
blocked by this delay.
🪄 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: beb86c1c-42fb-4392-a218-707348d17b7d

📥 Commits

Reviewing files that changed from the base of the PR and between 862b66a and 60e9046.

📒 Files selected for processing (1)
  • crates/machine-controller/src/handler/dpf.rs

Comment thread crates/machine-controller/src/handler/dpf.rs

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

🤔

@abvarshney-nv
abvarshney-nv merged commit 6db91ec into NVIDIA:main Jul 23, 2026
108 of 110 checks passed
@abvarshney-nv
abvarshney-nv deleted the minor_issue branch July 23, 2026 05:05
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