Skip to content

Conversation

@elfosardo
Copy link

Plus Fix deletion hang when aborting inspection during power-off

When deleting a host in inspecting or cleaning state, it would get
stuck because Ironic rejects power changes while a target provision
state is active. This fix detects these states and sends an abort
command first, allowing deletion to proceed immediately instead of
waiting for inspection/cleaning to complete.

Assisted-By: Claude Sonnet 4.5 (commercial license)
Signed-off-by: Riccardo Pittau <elfosardo@gmail.com>
(cherry picked from commit 4489951)
@openshift-ci-robot openshift-ci-robot added jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Jan 23, 2026
@openshift-ci-robot
Copy link

@elfosardo: This pull request references Jira Issue OCPBUGS-68369, which is valid.

7 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.21.0) matches configured target version for branch (4.21.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)
  • release note text is set and does not match the template
  • dependent bug Jira Issue OCPBUGS-65571 is in the state MODIFIED, which is one of the valid states (MODIFIED, ON_QA, VERIFIED)
  • dependent Jira Issue OCPBUGS-65571 targets the "4.22.0" version, which is one of the valid target versions: 4.22.0
  • bug has dependents

Requesting review from QA contact:
/cc @jadhaj

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Plus Fix deletion hang when aborting inspection during power-off

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot requested a review from jadhaj January 23, 2026 09:17
@elfosardo elfosardo changed the title OCPBUGS-68369: Abort inspection/cleaning before powering off during deletion [release-4.21] OCPBUGS-68369: Abort inspection/cleaning before powering off during deletion Jan 23, 2026
@openshift-ci openshift-ci bot requested review from honza and zaneb January 23, 2026 09:18
@openshift-ci
Copy link

openshift-ci bot commented Jan 23, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: elfosardo

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 23, 2026
@elfosardo
Copy link
Author

/retest

@elfosardo elfosardo force-pushed the abort-inspection-delete-fix-421 branch from b2f440d to 6d26883 Compare January 23, 2026 10:17
@elfosardo
Copy link
Author

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 23, 2026
When deleting a BMH during inspection, power-off could hang because:

1. After abort, node is in InspectFail with TargetProvisionState still
   set, blocking power changes
2. Ironic does not auto-clear TargetProvisionState in InspectFail state
3. PowerOff() misinterpreted the abort message in LastError as a
   power-off failure

Fix by:
- Explicitly transitioning from InspectFail to manageable to clear
  TargetProvisionState and allow power changes
- Ignoring "aborted" errors in LastError during power-off

(cherry picked from commit 1693931)
@elfosardo elfosardo force-pushed the abort-inspection-delete-fix-421 branch from 6d26883 to b5655e0 Compare January 23, 2026 10:19
@elfosardo
Copy link
Author

we need #450

@openshift-ci
Copy link

openshift-ci bot commented Jan 23, 2026

@elfosardo: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/unit b5655e0 link true /test unit

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants