Skip to content

Conversation

@muraee
Copy link
Contributor

@muraee muraee commented Dec 15, 2025

Summary

  • When a paused HostedCluster is deleted, the CAPI cluster must be unpaused to allow machine deletion to proceed
  • Previously, the pause check returned early before the deletion check could be reached, causing the HostedCluster deletion to get stuck
  • Modified pauseCAPICluster() to accept a boolean parameter controlling whether to pause or unpause
  • Added unpause call at the start of delete() to ensure the CAPI cluster is unpaused before deletion proceeds

Test plan

  • Unit tests added for pauseCAPICluster covering pause/unpause scenarios
  • Verified all unit tests pass: make test
  • Verified linting passes: make lint-fix
  • Manual testing: Create a paused HostedCluster, delete it, verify deletion proceeds

Fixes: https://issues.redhat.com/browse/OCPBUGS-67234

🤖 Generated with Claude Code

…luster

When a paused HostedCluster is deleted, the CAPI cluster must be
unpaused to allow machine deletion to proceed. Previously, the pause
check returned early before the deletion check could be reached,
causing the HostedCluster deletion to get stuck.

This change modifies pauseCAPICluster() to accept a boolean parameter
controlling whether to pause or unpause, and calls it with paused=false
at the start of the delete() function to ensure the CAPI cluster is
unpaused before deletion proceeds.

Fixes: https://issues.redhat.com/browse/OCPBUGS-67234

Signed-off-by: Mulham Raee <mulham.raee@gmail.com>
Commit-Message-Assisted-by: Claude (via Claude Code)
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 15, 2025

Important

Review skipped

Auto reviews are limited based on label configuration.

🚫 Review skipped — only excluded labels are configured. (1)
  • do-not-merge/work-in-progress

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


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

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 15, 2025
@muraee muraee changed the title fix(hostedcluster): unpause CAPI cluster when deleting paused HostedCluster OCPBUGS-67234: fix(hostedcluster): unpause CAPI cluster when deleting paused HostedCluster Dec 15, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 15, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci-robot openshift-ci-robot added jira/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Dec 15, 2025
@openshift-ci-robot
Copy link

@muraee: This pull request references Jira Issue OCPBUGS-67234, which is invalid:

  • expected the bug to target the "4.22.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

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

Details

In response to this:

Summary

  • When a paused HostedCluster is deleted, the CAPI cluster must be unpaused to allow machine deletion to proceed
  • Previously, the pause check returned early before the deletion check could be reached, causing the HostedCluster deletion to get stuck
  • Modified pauseCAPICluster() to accept a boolean parameter controlling whether to pause or unpause
  • Added unpause call at the start of delete() to ensure the CAPI cluster is unpaused before deletion proceeds

Test plan

  • Unit tests added for pauseCAPICluster covering pause/unpause scenarios
  • Verified all unit tests pass: make test
  • Verified linting passes: make lint-fix
  • Manual testing: Create a paused HostedCluster, delete it, verify deletion proceeds

Fixes: https://issues.redhat.com/browse/OCPBUGS-67234

🤖 Generated with Claude Code

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 added the area/hypershift-operator Indicates the PR includes changes for the hypershift operator and API - outside an OCP release label Dec 15, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 15, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: muraee

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 approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed do-not-merge/needs-area labels Dec 15, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 15, 2025

@muraee: 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/e2e-aws-4-21 1b53ff5 link true /test e2e-aws-4-21

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.

@muraee
Copy link
Contributor Author

muraee commented Dec 22, 2025

/test unit
/test verify

@muraee
Copy link
Contributor Author

muraee commented Jan 6, 2026

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Jan 6, 2026
@openshift-ci-robot
Copy link

@muraee: This pull request references Jira Issue OCPBUGS-67234, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.22.0) matches configured target version for branch (4.22.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @wewang58

Details

In response to this:

/jira refresh

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 wewang58 January 6, 2026 15:13
@muraee
Copy link
Contributor Author

muraee commented Jan 6, 2026

/auto-cc

@openshift-ci openshift-ci bot requested review from bryan-cox and jparrill January 6, 2026 15:13
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. area/hypershift-operator Indicates the PR includes changes for the hypershift operator and API - outside an OCP release do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. jira/severity-moderate Referenced Jira bug's severity is moderate 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