-
Notifications
You must be signed in to change notification settings - Fork 579
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
🐛 ec2/byoip: fix EIP leak when creating machine #5039
🐛 ec2/byoip: fix EIP leak when creating machine #5039
Conversation
Hi @mtulio. 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 Once the patch is verified, the new status will be reflected by the 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-sigs/prow repository. |
/ok-to-test |
b58e3e0
to
ace1bee
Compare
ace1bee
to
d5882fa
Compare
/test ? |
@mtulio: The following commands are available to trigger required jobs:
The following commands are available to trigger optional jobs:
Use
In response to this:
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-sigs/prow repository. |
/test pull-cluster-api-provider-aws-e2e |
Premature failure. /test pull-cluster-api-provider-aws-e2e |
/test pull-cluster-api-provider-aws-e2e |
Okay, previous test failures were flake. The latest run pass. OpenShift e2e BYOIP test is also passing install:
This PR is ready for review. PTAL? /test pull-cluster-api-provider-aws-e2e-eks |
Hi @nrb , would you mind taking a review in this bug, please? As you see in the last comments, we are struggling to run the job Furthermore, in downstream/OpenShift we are running several presubmit jobs (Public IPv4 pool is default over aws jobs) across the PR openshift/installer#8676 (vendoring this PR). I also introduced a new presubmit (openshift/release#56114) to enforce to disable the pool in CAPA provisioning to test the non-pool flow and it is all passing: https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_installer/8676/pull-ci-openshift-installer-master-e2e-aws-ovn-public-ipv4-pool-disabled/1829621227333881856 I will trigger again, but also open to hear from you if you could share your tougths of another job to validate it, or those presented is ok. Looking forward to hear from you, thanks! /test pull-cluster-api-provider-aws-e2e |
/assign @nrb |
/test pull-cluster-api-provider-aws-e2e |
tl;dr: looks like After some investigation with @nrb, we are seeing the job We are seeing in the Control Plane spec that the AMI for kube 1.25 isn't available:
Looks like the CAPI e2e[1] is setting the following variable: cluster-api-provider-aws/test/e2e/data/e2e_conf.yaml Lines 207 to 209 in abe918c
in the test spec: cluster-api-provider-aws/test/e2e/suites/unmanaged/unmanaged_CAPI_test.go Lines 112 to 129 in abe918c
Causing the failures when looking up for an AMI that does not exists in the test account. (maybe had been pruned or 1.25 is not supported and dont need anymore?) |
For reviewers: this PR is general ready for review. Following my last comment, the failure is unrelated with this PR. |
/override pull-cluster-api-provider-aws-e2e This test is failing due to something unrelated right now. |
@nrb: nrb unauthorized: /override is restricted to Repo administrators. In response to this:
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-sigs/prow repository. |
c804c11
to
16eeaa7
Compare
The instance creation flow is creating by default EIP to instances even if the BYO IP flow is set. BYO IPv4 creates and associates the EIP to instance after it is created, preventing paying for additional EIP (amazon-provided) when creating the instance when the BYO IPv4 Pool is defined to be used by the machine. Furthermore, the fix provides additional checks to prevent duplicated EIP in the BYO IP reconciliation loop. The extra checks include running the EIP association many times, while the EIP is already associated, and failures in the log when running the EIP association prematurely - when the instance isn't ready, Eg ec2 in pending state.
16eeaa7
to
4626a6a
Compare
PR #5118 merged, PR rebased to re-test the failed upgrade test. |
I don't think the failure is related to this PR, nor the previous image issues we were seeing; the /retest |
I am seeing a lot CloudFormation to provision required environment, I can't see if could be related. /retest |
@nrb e2e passing now! 🎉 |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: nrb 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 |
/lgtm |
/hold cancel |
What type of PR is this?
/kind bug
What this PR does / why we need it:
The instance creation flow is creating by default EIP to instances even if the BYO IP flow is set. BYO IPv4 creates and associates the EIP to instance after it is created, preventing paying for additional EIP (amazon-provided) when creating the instance when the BYO IPv4 Pool is defined to be used by the machine.
Furthermore, the fix provides additional checks to prevent duplicated EIP in the BYO IP reconciliation loop. The extra checks include running the EIP association many times, while the EIP is already associated, and failures in the log when running the EIP association prematurely - when the instance isn't ready, Eg ec2 in pending state.
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 #5038
Special notes for your reviewer:
Checklist:
Release note: