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
eni: Fix Cilium overallocating network interfaces #15911
Conversation
9563b6d
to
1eb7545
Compare
This commit modifies the CreateNetworkInterface mock API to mirror what the actual EC2 API implementation does for the `toAllocate` value, i.e. only use this number for secondary IP addresses, as a primary address is always implicitly allocated. Signed-off-by: Sebastian Wicki <sebastian@isovalent.com>
This fixes a bug where Cilium wrongly overestimated the amount of available ENI IP addresses. This bug was introduced when we removed the primary ENI IP address from the IPAM pool, but forgot to adjust the number of addresses used to compare with the AWS instance limits. This led to the operator overestimating the number of available IP addresses by one. This in turn could lead to the operator first failing to allocate more IPs (because it exceeded the limit) and then unnecessarily creating a new ENI to fulfill the allocation request. Fixes: 7c1bb35 ("aws/ec2: Exclude primary ENI IP from IPAM pool") Fixes: cilium#15877 Signed-off-by: Sebastian Wicki <sebastian@isovalent.com>
1eb7545
to
2f60008
Compare
test-me-please |
1 similar comment
test-me-please |
retest-1.16-netnext Edit: Was https://jenkins.cilium.io/job/Cilium-PR-K8s-1.16-net-next/406/ #15455 |
retest-gke Edit: Cilium was sigkilled, might have been a issue with the cluster - retesting https://jenkins.cilium.io/job/Cilium-PR-K8s-GKE/5331/ |
retest-1.16-netnext Seems like it hit a network fluke: https://jenkins.cilium.io/job/Cilium-PR-K8s-1.16-net-next/408/ |
test-1.19-5.4 |
test-1.16-netnext |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this! LGTM 🚀
Marking this ready to merge, the CI failure is in the datapath which is not affected by this very ENI-specific PR. Created an issue for it #15998 |
This fixes a bug where Cilium wrongly overestimated the amount of available
ENI IP addresses. This bug was introduced when we removed the primary
ENI IP address from the IPAM pool, but forgot to adjust the number of
addresses used to compare with the AWS instance limits.
This led to the operator overestimating the number of available IP
addresses by one. This in turn could lead to the operator first failing
to allocate more IPs (because it exceeded the limit) and then
unnecessarily creating a new ENI to fulfill the allocation request.
Fixes: 7c1bb35 ("aws/ec2: Exclude primary ENI IP from IPAM pool")
Fixes: #15877