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

Dont list and terminate ASG-managed EC2 instances #16222

Closed
wants to merge 1 commit into from

Conversation

rifelpet
Copy link
Member

@rifelpet rifelpet commented Jan 5, 2024

/hold for feedback

Looking at scale tests, kops delete cluster spends 6 minutes trying to terminate all of the ec2 instances. In reality this shouldn't be necessary because kops also deletes the ASGs (which appear to happen much faster) and the ASGs will terminate the instances.

I dont know how the timing compares but it should at least eliminate the throttled API calls.

@k8s-ci-robot
Copy link
Contributor

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

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. 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. area/provider/aws Issues or PRs related to aws provider labels Jan 5, 2024
@k8s-ci-robot
Copy link
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 ask for approval from rifelpet. 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

@hakman
Copy link
Member

hakman commented Jan 5, 2024

Both me and @upodroid thought about this and I think it's a good idea.
The problem is that other resources depend on instances, like volumes and would leave those resources hanging (maybe).

@rifelpet
Copy link
Member Author

rifelpet commented Jan 5, 2024

Both me and @upodroid thought about this and I think it's a good idea.

The problem is that other resources depend on instances, like volumes and would leave those resources hanging (maybe).

Could we have volumes depend on the ASGs instead? What I'm not sure about is if all instances are gone at the time that the ASG deletion returns, or whether AWS is still in the process of terminating them.

@hakman
Copy link
Member

hakman commented Jan 5, 2024

Both me and @upodroid thought about this and I think it's a good idea.
The problem is that other resources depend on instances, like volumes and would leave those resources hanging (maybe).

Could we have volumes depend on the ASGs instead? What I'm not sure about is if all instances are gone at the time that the ASG deletion returns, or whether AWS is still in the process of terminating them.

Or we could just have instances that have non-root volumes added to the list.
I think listing the instances should still be done. We still have some case where we create ec2 instance for maybe NAT?

@rifelpet
Copy link
Member Author

rifelpet commented Jan 6, 2024

Replaced by #16229

@rifelpet rifelpet closed this Jan 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/provider/aws Issues or PRs related to aws provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. 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.

3 participants