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

eni: Fix Cilium overallocating network interfaces #15911

Merged
merged 2 commits into from
May 4, 2021

Commits on Apr 28, 2021

  1. eni/mock: Use correct number of secondary IPs on interface

    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>
    gandro committed Apr 28, 2021
    Configuration menu
    Copy the full SHA
    26600ba View commit details
    Browse the repository at this point in the history
  2. eni: Fix Cilium overallocating network interfaces

    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>
    gandro committed Apr 28, 2021
    Configuration menu
    Copy the full SHA
    2f60008 View commit details
    Browse the repository at this point in the history