Skip to content

Conversation

AnishShah
Copy link
Contributor

@AnishShah AnishShah commented Jan 18, 2024

Please ensure your pull request adheres to the following guidelines:

  • For first time contributors, read Submitting a pull request
  • All code is covered by unit and/or runtime tests where feasible.
  • All commits contain a well written commit description including a title,
    description and a Fixes: #XXX line if the commit addresses a particular
    GitHub issue.
  • If your commit description contains a Fixes: <commit-id> tag, then
    please add the commit author[s] as reviewer[s] to this issue.
  • All commits are signed off. See the section Developer’s Certificate of Origin
  • Provide a title or release-note blurb suitable for the release notes.
  • Are you a user of Cilium? Please add yourself to the Users doc
  • Thanks for contributing!

I'm periodically calling GetInstanceTypes EC2 API call to keep updating ENI limits. I think this is overkill (since AWS might be launched only a few new instances per year). But I think it is ok as there are only hundreds of AWS instances and shouldn't impact memory/network perf.

Another alternative is to lazy fetch new instance type only when we don't find the instance type. I tried implementing this approach but it required a lot of refactoring.

Fixes: #28424

Fix an issue where cilium is unable to allocate IP addresses when it is running on newly launched AWS instances

@AnishShah AnishShah requested a review from a team as a code owner January 18, 2024 01:26
@AnishShah AnishShah requested a review from christarazi January 18, 2024 01:26
@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Jan 18, 2024
@github-actions github-actions bot added the kind/community-contribution This was a contribution made by a community member. label Jan 18, 2024
This commit refactors the limits package. Instead of passing the
ec2Client struct, we define an interface containing the
GetInstanceTypes EC2 API method. This allows us to write unit tests for
this function using EC2 mock API client.

Signed-off-by: Anish Shah <anishshah@google.com>
With this change, we will periodically sync ENI limits using EC2 API.
This will help dynamically updating the ENI limits when a new AWS
instance is launched without needing to restart cilium.

Fixes cilium#28424

Signed-off-by: Anish Shah <anishshah@google.com>
@christarazi christarazi added area/operator Impacts the cilium-operator component area/eni Impacts ENI based IPAM. sig/ipam area/ipam IP address management, including cloud IPAM release-note/misc This PR makes changes that have no direct user impact. labels Jan 18, 2024
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Jan 18, 2024
@christarazi christarazi added release-note/bug This PR fixes an issue in a previous release of Cilium. and removed release-note/misc This PR makes changes that have no direct user impact. labels Jan 18, 2024
@AnishShah
Copy link
Contributor Author

@christarazi , do you think this change is safe enough to be backported?

@christarazi
Copy link
Member

Backports are subject to the backporting criteria. From what I can tell, this PR could be considered for v1.15 backport, but any further seems to be a stretch according to the criteria.

@AnishShah
Copy link
Contributor Author

Thanks, @christarazi. Can you help with triggering the remaining tests?

@christarazi
Copy link
Member

christarazi commented Jan 19, 2024

@AnishShah
Copy link
Contributor Author

/test
/retest

@AnishShah
Copy link
Contributor Author

any idea if some tests are flaky? The test failure doesn't seem to be related to my change. How can I retrigger tests?

@christarazi
Copy link
Member

I've retriggered the tests as they were flakes.

@gandro gandro added this pull request to the merge queue Jan 22, 2024
Merged via the queue into cilium:main with commit 85abef4 Jan 22, 2024
@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/eni Impacts ENI based IPAM. area/ipam IP address management, including cloud IPAM area/operator Impacts the cilium-operator component kind/community-contribution This was a contribution made by a community member. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/bug This PR fixes an issue in a previous release of Cilium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cilium operator cannot allocate IP addresses when AWS launch new instance types
3 participants