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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Fix deleting AWSCluster when VPC doesn't exist #1453

Merged
merged 1 commit into from
Jan 9, 2020
Merged

馃悰 Fix deleting AWSCluster when VPC doesn't exist #1453

merged 1 commit into from
Jan 9, 2020

Conversation

aaroniscode
Copy link
Contributor

What this PR does / why we need it:
If a VPC cannot be created for an AWSCluster object (like when a VPC limit is reached), the controller will fail to delete the AWSCluster as certain AWS calls fail without a VPC id.

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 #1375

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 28, 2019
@aaroniscode
Copy link
Contributor Author

Took a deeper look at the delete process and code and found that there is a VPC lookup process and
it currently takes place in deleteVPC. I took the code and moved it up earlier in the process, in DeleteNetwork as we can't delete the network components if the VPC doesn't exist. This is also where the error was occurring.

Copy link
Member

@vincepri vincepri left a comment

Choose a reason for hiding this comment

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

/approve
/assign @detiber

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aaroniscode, vincepri

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 k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 2, 2020
@ncdc
Copy link
Contributor

ncdc commented Jan 9, 2020

LGTM. Asking @randomvariable to look too.

@randomvariable
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 9, 2020
@k8s-ci-robot k8s-ci-robot merged commit 75271f7 into kubernetes-sigs:master Jan 9, 2020
@aaroniscode aaroniscode deleted the vpc_delete branch January 18, 2020 03:58
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cluster deletion fails when VpcID is an empty string
6 participants