Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…#1495) 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 Co-authored-by: Thomas Jackson <jacksontj.89@gmail.com>
- Loading branch information