fix(nodeadm): calculate max pods on default network card#2229
Closed
mselim00 wants to merge 1 commit intoawslabs:mainfrom
Closed
fix(nodeadm): calculate max pods on default network card#2229mselim00 wants to merge 1 commit intoawslabs:mainfrom
mselim00 wants to merge 1 commit intoawslabs:mainfrom
Conversation
Contributor
@jaydeokar is working on removing this limitation, so we can't bake this assumption in. |
Contributor
Author
|
Absorbed into #2446 The VPC CNI has yet to implement support for allocating on multiple ENIs, and even when it does, the fallback should line up with the default values and allow custom configurations for those using that version + feature of the VPC CNI. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
Description of changes:
At the moment there's a gap between the max pods value from eni-max-pods.txt and the fallback calculator for multicard instance types.
Both use the equation
max # network interfaces * (max # ipv4 addresses per interface -1) + 2for the max pods value, but the text file is calculated using the max number of network interfaces for the default network card, whereas the fallback uses the total maximum number of network interfaces for the instance. To take an example, considerp4de.24xlargeeni-max-pods.txt shows 737, which follows from
NetworkCards[DefaultNetworkCardIndex].MaximumNetworkInterfaces * (Ipv4AddressesPerInterface - 1) + 2 = 15 * (50 - 1) + 2 = 737. On the other hand, the calculator fallback currently usesMaximumNetworkInterfaces * (Ipv4AddressesPerInterface - 1) + 2 = 60 * (50 - 1) + 2 = 2,942.The max pods value is mainly intended to account for the fact that the VPC CNI only allocates pods using the first network interface. Since this calculator is only used if no corresponding value was found in the text file for the instance type, the existing math could also lead to a major discrepancy between AMI versions for new instance types.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Testing Done
Added a unit test for a mock multi-card instance type.
See this guide for recommended testing for PRs. Some tests may not apply. Completing tests and providing additional validation steps are not required, but it is recommended and may reduce review time and time to merge.