Skip to content

patch(v2.2): advance decommissioning past immediate UEFI password jobs - #6173

Open
ericpretzel wants to merge 2 commits into
dsx-ai-factory:release/v2.2from
ericpretzel:fix/v2.2-uefi-password-immediate-job
Open

ericpretzel wants to merge 2 commits into
dsx-ai-factory:release/v2.2from
ericpretzel:fix/v2.2-uefi-password-immediate-job

Conversation

@ericpretzel

Copy link
Copy Markdown
Contributor

During the decommissioning process for managed hosts, we submit a request to clear the host UEFI password. The behavior for this request is platform-dependent. The Dell SCP-import fallback used to clear the host UEFI password creates an immediate job that goes New -> Running -> Completed and never reports Scheduled, so WaitForUefiPasswordJobScheduled waited forever and the host stalled in Decommissioning/DeconfiguringHost.

Treat a Completed job as needing no reboot to run (we reboot later anyway) and move straight to WaitForUefiPasswordJobCompletion; a Scheduled job still gets its reboot.

Related issues

NVBUG 6773236

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.)

The Dell SCP-import fallback used to clear the host UEFI password creates
an immediate job that goes New -> Running -> Completed and never reports
Scheduled, so WaitForUefiPasswordJobScheduled waited forever and the host
stalled in Decommissioning/DeconfiguringHost past its SLA.

Treat a Completed job as needing no reboot to run and move straight to
WaitForUefiPasswordJobCompletion; a Scheduled job still gets its reboot.

Signed-off-by: Eric Wetzel <ewetzel@nvidia.com>
Keep one Completed-path check and a one-line comment that some platforms skip Scheduled.

Signed-off-by: Eric Wetzel <ewetzel@nvidia.com>
@ericpretzel
ericpretzel requested a review from a team September 15, 2026 02:48
@coderabbitai

coderabbitai Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 171f63f4-e31d-4d65-94ed-59a751dd7b2e

📥 Commits

Reviewing files that changed from the base of the PR and between 25aa2de and 694947a.

📒 Files selected for processing (2)
  • crates/api-core/src/tests/managed_host_decommissioning.rs
  • crates/machine-controller/src/handler/decommissioning.rs

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


Summary by CodeRabbit

  • Bug Fixes
    • Improved managed host decommissioning after a UEFI password job reports completion.
    • Hosts now proceed directly to completion monitoring when the job is already complete, while scheduled jobs continue through the reboot step.
  • Tests
    • Added coverage for the completed UEFI password job flow.

Walkthrough

The decommissioning handler now moves completed UEFI password jobs directly to completion monitoring. Scheduled jobs still move to reboot handling. An integration test verifies the completed-job transition.

Changes

UEFI Password Job Completion

Layer / File(s) Summary
Completed job state flow
crates/machine-controller/src/handler/decommissioning.rs, crates/api-core/src/tests/managed_host_decommissioning.rs
The handler maps JobState::Completed to WaitForUefiPasswordJobCompletion and keeps scheduled jobs on the reboot path. The integration test verifies the state transition after one controller iteration.

Priority: ⬇️ Low

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

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant RedfishSimulator
  participant DecommissioningHandler
  participant ManagedHost
  RedfishSimulator->>DecommissioningHandler: Report JobState::Completed
  DecommissioningHandler->>ManagedHost: Set WaitForUefiPasswordJobCompletion
  ManagedHost-->>DecommissioningHandler: Persist updated state
Loading

Merge Risk: ⚪ Minimal · up to 69494

Completed UEFI password jobs proceed without an unnecessary reboot, while scheduled jobs retain their existing behavior. The changed transition and its integration coverage support merging.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main fix: advancing decommissioning past immediately completed UEFI password jobs.
Description check ✅ Passed The description explains the platform-specific job-state behavior, the decommissioning stall, the completed-job fix, the scheduled-job behavior, and the related testing.
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.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-09-15T02:48:31.647025Z 694947a PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown

🔐 TruffleHog Secret Scan

No secrets or credentials found!

Your code has been scanned for 700+ types of secrets and credentials. All clear! 🎉

🔗 View scan details

🕐 Last updated: 2026-09-15 02:51:50 UTC | Commit: 694947a

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