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

cherry-pick PR-1279 into release-1.8 #1495

Merged
merged 1 commit into from
Jun 7, 2021

Conversation

M00nF1sh
Copy link
Contributor

@M00nF1sh M00nF1sh commented Jun 7, 2021

Previously tryAssignIPs would always allocate all available IPs on the
ENI regardless of the number of IPs the node would want. A great
showcase of this behavior is on node bootstrap. Assuming we have a node
with maxIPsPerENI=30 and WARM_IP_TARGET=5, the following happens:

  • Node starts with single IP
  • tryAssignIPs allocates an additional 29 IPs
  • decreaseIPPool will release 29-5=24 IPs

After the change this would look like:

  • Node starts with a single IP
  • tryAssignIPs allocates an additional 5 IPs

So in this very common flow we cut out an entire AWS API call per node.
In addition this behavior exhibits itself any time we need to scale up
IPs as tryAssignIPs always attempts to over-allocate IPs -- which then
just need to be released almost immediately.

Fixes #1272

What type of PR is this?

Which issue does this PR fix:

What does this PR do / Why do we need it:
cherry-pick PR-1279 into release-1.8

If an issue # is not available please add repro steps and logs from IPAMD/CNI showing the issue:

Testing done on this change:

Automation added to e2e:

Will this break upgrades or downgrades. Has updating a running cluster been tested?:

Does this change require updates to the CNI daemonset config files to work?:

Does this PR introduce any user-facing change?:


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

Previously tryAssignIPs would always allocate all available IPs on the
ENI regardless of the number of IPs the node would want. A great
showcase of this behavior is on node bootstrap. Assuming we have a node
with maxIPsPerENI=30 and WARM_IP_TARGET=5, the following happens:
- Node starts with single IP
- tryAssignIPs allocates an additional 29 IPs
- decreaseIPPool will release 29-5=24 IPs

After the change this would look like:
- Node starts with a single IP
- tryAssignIPs allocates an additional 5 IPs

So in this very common flow we cut out an entire AWS API call per node.
In addition this behavior exhibits itself any time we need to scale up
IPs as tryAssignIPs always attempts to over-allocate IPs -- which then
just need to be released almost immediately.

Fixes aws#1272
@M00nF1sh M00nF1sh merged commit c605851 into aws:release-1.8 Jun 7, 2021
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