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

Fix imds setting for multiple enis on ipv6 #1275

Merged
merged 1 commit into from
May 9, 2023

Conversation

willgleich
Copy link
Contributor

@willgleich willgleich commented Apr 21, 2023

Issue #, if available:
Closes #1103 .
Description of changes:
This changes the imds metadata path to choose the latest/meta-data/mac rather than the network interfaces level which can incorrectly label the node ip field of the kubelet args when an ipv6 instance has multiple ENIs. The incorrect latest/meta-data/network/interfaces/macs/ will not guarantee eth0 as the mac address choice causing the below errors.

This will resolve the following kubectl error when trying to view pod logs on an ipv6 incorrectly configured instance:

Error from server: no preferred addresses found; known addresses: []

Or in the kubelet logs it will say:

Failed to set some node status fields" err="failed to validate nodeIP: node IP:

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
I've modified this line using patch on my user_data script to this new imds path to ensure the functionality works as intended.

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.

Copy link
Contributor

@ljosyula ljosyula left a comment

Choose a reason for hiding this comment

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

lgtm

@ljosyula ljosyula merged commit f68e0e6 into awslabs:master May 9, 2023
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.

bootstrap uses incorrect IP when multiple ENI exists on node
2 participants