Skip to content

🌱 Add regression test for security group failure on previously ready cluster#3104

Open
larainema wants to merge 1 commit intokubernetes-sigs:mainfrom
larainema:fix/test-sg-failure-clears-ready-condition
Open

🌱 Add regression test for security group failure on previously ready cluster#3104
larainema wants to merge 1 commit intokubernetes-sigs:mainfrom
larainema:fix/test-sg-failure-clears-ready-condition

Conversation

@larainema
Copy link
Copy Markdown
Contributor

What this PR does

Adds a regression test for the scenario described in #2993: a cluster that was already Ready should properly clear its ReadyCondition when security group reconciliation fails on a subsequent reconcile.

Why

The existing test (should set SecurityGroupsReadyCondition to False when security group reconciliation fails) only covers the fresh cluster scenario where no prior conditions are set. It doesn't validate the more critical regression scenario from #2993 where:

  1. The cluster was already provisioned and Ready (from a previous successful reconcile)
  2. A security group rule update triggers a new reconcile
  3. Security group reconciliation fails (e.g., SecurityGroupRuleExists conflict)
  4. The cluster should show as not Ready

How

The test pre-sets ReadyCondition=True, SecurityGroupsReadyCondition=True, and NetworkReadyCondition=True to simulate a previously successful reconcile, then triggers a security group failure and verifies:

  • ReadyCondition flips to False (via handleUpdateOSCError)
  • SecurityGroupsReadyCondition flips to False with reason SecurityGroupCreateFailed
  • NetworkReadyCondition remains True (network reconciliation succeeded)

Ref #2993

…iously ready cluster

Add a regression test for the scenario described in kubernetes-sigs#2993 where a cluster
that was already Ready would not show as failed when security group
reconciliation fails on a subsequent reconcile.

The test pre-sets ReadyCondition=True, SecurityGroupsReadyCondition=True,
and NetworkReadyCondition=True to simulate a previously successful
reconcile, then triggers a security group failure and verifies that:
- ReadyCondition flips to False
- SecurityGroupsReadyCondition flips to False
- NetworkReadyCondition remains True (network succeeded)

This complements the existing test which only covers the fresh cluster
scenario (no prior conditions set).

Ref: kubernetes-sigs#2993
Signed-off-by: Dong Ma <winterma.dong@gmail.com>
@netlify
Copy link
Copy Markdown

netlify bot commented Apr 7, 2026

Deploy Preview for kubernetes-sigs-cluster-api-openstack ready!

Name Link
🔨 Latest commit 313c884
🔍 Latest deploy log https://app.netlify.com/projects/kubernetes-sigs-cluster-api-openstack/deploys/69d51739512f380008ee325b
😎 Deploy Preview https://deploy-preview-3104--kubernetes-sigs-cluster-api-openstack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign fabriziopandini for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 7, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Hi @larainema. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 7, 2026
@nikParasyr
Copy link
Copy Markdown
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 7, 2026
@larainema
Copy link
Copy Markdown
Contributor Author

/retest-required

@nikParasyr
Copy link
Copy Markdown
Contributor

/retest

1 similar comment
@larainema
Copy link
Copy Markdown
Contributor Author

/retest

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

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

Status: Inbox

Development

Successfully merging this pull request may close these issues.

3 participants