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

Update enimetadata for interfaces with no ip info #3041

Closed
wants to merge 4 commits into from

Conversation

Pavani-Panakanti
Copy link
Contributor

What type of PR is this?
bug

Which issue does this PR fix?:
Network card field is not being present in imds in all instances. We can rely on it to filter out ENI's on non-0 network cards

What does this PR do / Why do we need it?:
Check if ipv4 and ipv6 fields are present in imds. Fetch these data only if these fields are present

Testing done on this change:
Verified aws-node is coming up as expected and pods are being scheduled for both multi card and single card instances. Verified with interface with no ips

Will this PR introduce any new dependencies?:
No

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

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.

@Pavani-Panakanti Pavani-Panakanti requested a review from a team as a code owner September 26, 2024 05:37
return ENIMetadata{}, err
}
if len(imdsIPv4s) > 0 {
isEFAOnlyInterface = false
Copy link
Contributor

Choose a reason for hiding this comment

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

My concern is if the ENI is truly missing local-ipv4

Copy link
Member

Choose a reason for hiding this comment

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

field == "local-ipv4s"

I agree. If these kind of 'structural' definitions is supported by any documentation or spec, that will be best to rely upon.

@@ -136,6 +136,24 @@ func (imds TypedIMDS) GetMACs(ctx context.Context) ([]string, error) {
return list, err
}

// GetMACImdsFields returns the imds fields present for a MAC
Copy link
Member

Choose a reason for hiding this comment

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

Couldn't we use GetMACs function and check for it.

  • Introducing yet another GetMACImdsFields - only to check for the fields might be introduced a too specialized a function for our purpose here.

Copy link
Member

Choose a reason for hiding this comment

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

It will be preferable to use GetMACs to continue with coverage here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@orsenthil Can you add more details on using GetMACs.. So efa-only will not have any IP fields associated with them. So checking local-ipv4s field. Want to understand how we can use GetMACs here

Copy link
Member

Choose a reason for hiding this comment

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

@Pavani-Panakanti - you are right. I thought, we were using the network/interfaces/macs/ and some property of that output. This is different. Sorry for the distraction.

@orsenthil
Copy link
Member

The integration test is successful on this change - https://github.com/aws/amazon-vpc-cni-k8s/actions/runs/11053939700

But we have to make sure that we are doing this accurately - with the support of the spec which defines the multi-card instance characteristics.

@Pavani-Panakanti
Copy link
Contributor Author

Following with this change in new PR #3047

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