cluster-api-provider-aws icon indicating copy to clipboard operation
cluster-api-provider-aws copied to clipboard

Deletion fails for aws cluster with vpc limit exceeded

Open AmitSahastra opened this issue 2 years ago • 7 comments

State

READY

What is the purpose of the pull request

deletion fails for aws cluster with vpc limit exceeded

Implementation

Issue: In case cluster creation didn't go through due to the VPC limit being exceeded, the VPC ID will be nil and during deletion of the such cluster, the AWS client will give the error.

│ E0907 09:53:16.390472       1 network.go:89] controller/awscluster "msg"="non-fatal: VPC ID is missing, " "error"=null "cluster"="am-cluster-123-4" "name"="am-cluster-123-4" "namespace"="am-cluster-123-4" "reco │
│ nciler group"="infrastructure.cluster.x-k8s.io" "reconciler 

Fix: Check the error code during VPC deletion and skip it if the error code is "MissingParameter"

What type of PR is this?

What this PR does / why we need it:

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 #

Special notes for your reviewer:

Checklist:

  • [ ] squashed commits
  • [ ] includes documentation
  • [ ] adds unit tests
  • [ ] adds or updates e2e tests

AmitSahastra avatar Sep 26 '22 05:09 AmitSahastra

Hi @AmitSahastra. 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.

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/test-infra repository.

k8s-ci-robot avatar Sep 26 '22 05:09 k8s-ci-robot

/ok-to-test

Thank you for your contribution! Please include a unit test for your change. :) Thanks!

Skarlso avatar Sep 26 '22 05:09 Skarlso

/test ?

Ankitasw avatar Sep 28 '22 05:09 Ankitasw

@Ankitasw: The following commands are available to trigger required jobs:

  • /test pull-cluster-api-provider-aws-build
  • /test pull-cluster-api-provider-aws-test
  • /test pull-cluster-api-provider-aws-verify

The following commands are available to trigger optional jobs:

  • /test pull-cluster-api-provider-aws-apidiff-main
  • /test pull-cluster-api-provider-aws-e2e
  • /test pull-cluster-api-provider-aws-e2e-blocking
  • /test pull-cluster-api-provider-aws-e2e-clusterclass
  • /test pull-cluster-api-provider-aws-e2e-conformance
  • /test pull-cluster-api-provider-aws-e2e-conformance-with-ci-artifacts
  • /test pull-cluster-api-provider-aws-e2e-eks

Use /test all to run the following jobs that were automatically triggered:

  • pull-cluster-api-provider-aws-apidiff-main
  • pull-cluster-api-provider-aws-build
  • pull-cluster-api-provider-aws-test
  • pull-cluster-api-provider-aws-verify

In response to this:

/test ?

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/test-infra repository.

k8s-ci-robot avatar Sep 28 '22 05:09 k8s-ci-robot

/test pull-cluster-api-provider-aws-e2e

Ankitasw avatar Sep 28 '22 05:09 Ankitasw

@AmitSahastra - would you be able to add a test to cover this scenario?

richardcase avatar Oct 10 '22 15:10 richardcase

/milestone v2.0.0

richardcase avatar Oct 25 '22 15:10 richardcase

@AmitSahastra would you be able to continue with the test scenario?

Ankitasw avatar Oct 28 '22 08:10 Ankitasw

@AmitSahastra would you be able to continue with the test scenario?

Hi, I am held up with a few things and unable to take time to finish UTs to cover test scenarios. I can close this PR for some time and reopen it with updated tests.

AmitSahastra avatar Nov 02 '22 03:11 AmitSahastra

@richardcase I can raise a separate issue to write E2E test for this scenario, and merge this PR, if that's ok?

Ankitasw avatar Nov 07 '22 12:11 Ankitasw

@Ankitasw - ok, lets go with creating an issue to do the e2e test as a follow-up and get this in

richardcase avatar Nov 07 '22 12:11 richardcase

/lgtm /approve

Ankitasw avatar Nov 07 '22 12:11 Ankitasw

@AmitSahastra I think you might have to rebase the PR, I have created separate issue for E2E tests that we can address later, but this needs to fixed now.

Ankitasw avatar Nov 07 '22 12:11 Ankitasw

/test pull-cluster-api-provider-aws-e2e

AmitSahastra avatar Nov 08 '22 05:11 AmitSahastra

@Ankitasw have rebased it, pls do review it again.

AmitSahastra avatar Nov 08 '22 06:11 AmitSahastra

Also, please squash the commits.

Ankitasw avatar Nov 08 '22 06:11 Ankitasw

@AmitSahastra thanks will merge it once the prow failures resolve

Ankitasw avatar Nov 08 '22 07:11 Ankitasw

@AmitSahastra could you push a blank commit, such that jobs run again?

Ankitasw avatar Nov 08 '22 15:11 Ankitasw

/retest

Ankitasw avatar Nov 08 '22 16:11 Ankitasw

/lgtm /approve

Ankitasw avatar Nov 08 '22 16:11 Ankitasw

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Ankitasw

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

The pull request process is described 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

k8s-ci-robot avatar Nov 08 '22 16:11 k8s-ci-robot