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

Ignore non-zero cards #2784

Merged
merged 1 commit into from
Feb 14, 2024
Merged

Ignore non-zero cards #2784

merged 1 commit into from
Feb 14, 2024

Conversation

jchen6585
Copy link
Contributor

@jchen6585 jchen6585 commented Feb 5, 2024

What type of PR is this?

bug

Which issue does this PR fix:
N/A

What does this PR do / Why do we need it:
The previous logic c.dataStore.GetENIs() < (c.maxENI - c.unmanagedENI - trunkEni) would return negative for multicard instance types that had EFA devices installed on non-zero cards. This adds another value to the inequality to negate ENIs on non-zero cards as CNI does not support multi-card yet.

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

Testing done on this change:

CNI and IPAMD suites look good

Will this PR introduce any new dependencies?:

No

Will this break upgrades or downgrades? Has updating a running cluster been tested?:
No, Yes

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

No

Does this PR introduce any user-facing change?:

No


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

@jchen6585 jchen6585 requested a review from a team as a code owner February 5, 2024 21:42
pkg/ipamd/ipamd.go Outdated Show resolved Hide resolved
pkg/ipamd/ipamd.go Outdated Show resolved Hide resolved
@jchen6585 jchen6585 force-pushed the eni-calc-fix branch 2 times, most recently from 2afc2ce to c23dca4 Compare February 7, 2024 23:32
@jchen6585 jchen6585 changed the title hasRoomForEni fix Ignore non-zero cards Feb 7, 2024
pkg/ipamd/ipamd.go Outdated Show resolved Hide resolved
pkg/awsutils/awsutils.go Show resolved Hide resolved
pkg/ipamd/ipamd.go Outdated Show resolved Hide resolved
pkg/ipamd/ipamd.go Outdated Show resolved Hide resolved
pkg/ipamd/ipamd.go Outdated Show resolved Hide resolved
pkg/awsutils/awsutils.go Outdated Show resolved Hide resolved
jdn5126
jdn5126 previously approved these changes Feb 13, 2024
pkg/awsutils/awsutils.go Outdated Show resolved Hide resolved
pkg/awsutils/awsutils.go Outdated Show resolved Hide resolved
pkg/ipamd/ipamd.go Outdated Show resolved Hide resolved
pkg/ipamd/ipamd.go Outdated Show resolved Hide resolved
Copy link
Contributor

@jayanthvn jayanthvn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@jchen6585 jchen6585 merged commit 87ca4e2 into aws:master Feb 14, 2024
6 checks passed
jchen6585 added a commit to jchen6585/amazon-vpc-cni-k8s that referenced this pull request Feb 20, 2024
)

Co-authored-by: Joseph Chen <chenjoez@amazon.com>
jchen6585 added a commit that referenced this pull request Feb 20, 2024
#2802)

Co-authored-by: Joseph Chen <chenjoez@amazon.com>
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.

4 participants