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

Fixed bug in aws cloudprovider where API machinery IsNotFound was incorrectly used on ec2 Terminate resp #553

Merged
merged 1 commit into from
Jul 26, 2021

Conversation

bwagner5
Copy link
Contributor

Issue, if available:
N/A

Description of changes:

  • Fixes a bug where API Machinery errors.IsNotFound() was being used to evaluate the error response from an AWS sdk call to EC2. The specific call is checking if the TerminateInstances API returns an "Instance ID does not exist" error which would indicate that the instance was already terminated or for whatever other reason, no longer exists. In this case, Karpenter should move along and delete the nodes from the k8s API server.

TLDR:
The logic was correct, but the wrong error check was used which caused nodes to hang when the ec2 instance had already been termianted.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@bwagner5 bwagner5 requested a review from ellistarn July 26, 2021 22:24
@netlify
Copy link

netlify bot commented Jul 26, 2021

✔️ Deploy Preview for karpenter-docs-prod canceled.

🔨 Explore the source changes: 39f1108

🔍 Inspect the deploy log: https://app.netlify.com/sites/karpenter-docs-prod/deploys/60ff36220dab080007d49b14

@ellistarn
Copy link
Contributor

Related to #549?

Copy link
Contributor

@ellistarn ellistarn left a comment

Choose a reason for hiding this comment

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

Nice!

@bwagner5
Copy link
Contributor Author

Related to #549?

I think that is a different issue. I suspect you're correct about the NodeName == ""

@bwagner5 bwagner5 requested a review from njtran July 26, 2021 22:38
Copy link
Contributor

@njtran njtran left a comment

Choose a reason for hiding this comment

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

lgtm

@bwagner5 bwagner5 merged commit 6a67e3a into aws:main Jul 26, 2021
gfcroft pushed a commit to gfcroft/karpenter-provider-aws that referenced this pull request Nov 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants