Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: check if PowerVS instances are cleaned up in workspace before creating a cluster #2001

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Amulyam24
Copy link
Contributor

@Amulyam24 Amulyam24 commented Oct 9, 2024

What this PR does / why we need it:
In PowerVS CI, we have seen a case where after the first test case, the VMs deletion is in progress and we proceed to create the second cluster. It leads to the error

Failed to allocate the network(s) with error No fixed IP addresses available for network

Adding this change to check if the instances are deleted before each cluster creation.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #1877

Special notes for your reviewer:

/area provider/ibmcloud

  1. Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

Release note:

check if PowerVS instances are cleaned up in workspace before creating a cluster

@k8s-ci-robot k8s-ci-robot added the area/provider/ibmcloud Issues or PRs related to ibmcloud provider label Oct 9, 2024
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Oct 9, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

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

Copy link

netlify bot commented Oct 9, 2024

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

Name Link
🔨 Latest commit ebfb34d
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-cluster-api-ibmcloud/deploys/670f8c5d87305f0008779ec0
😎 Deploy Preview https://deploy-preview-2001--kubernetes-sigs-cluster-api-ibmcloud.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 site configuration.

@Amulyam24
Copy link
Contributor Author

Also needs changes to the job - ppc64le-cloud/test-infra#488

@Amulyam24
Copy link
Contributor Author

/cc @Karthik-K-N

test/e2e/e2e_test.go Show resolved Hide resolved
test/e2e/e2e_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@Karthik-K-N Karthik-K-N left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

// CheckPowerVSInstances verifies if the Powervs instances are deleted
// before proceeding with the next cluster creation.
func CheckPowerVSInstances(serviceInstanceID string) error {
pclient, err := getPowerVSInstanceClient(serviceInstanceID)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For my better understanding, since we are trying to check all the VMs under this service instance is being deleted, So there wont be two jobs running at any time right, Because in case other will be creating and we are waiting for it be deleted?


// CheckPowerVSInstances verifies if the Powervs instances are deleted
// before proceeding with the next cluster creation.
func CheckPowerVSInstances(serviceInstanceID string) error {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a thought, it can be this anyway, If possible its better to rename this function because i think

  1. PowerVSInstances can be PowerVS server instance or service instance, Here we are looking for server instances(VM).
  2. We are only checking for deleting state, may be some name related to delete would directly indicate the purpose of function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/provider/ibmcloud Issues or PRs related to ibmcloud provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CI: PowerVS cluster creation fails with no fixed IP addresses available
3 participants