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

bootstrap uses incorrect IP when multiple ENI exists on node #1103

Closed
M00nF1sh opened this issue Nov 18, 2022 · 1 comment · Fixed by #1275
Closed

bootstrap uses incorrect IP when multiple ENI exists on node #1103

M00nF1sh opened this issue Nov 18, 2022 · 1 comment · Fixed by #1275

Comments

@M00nF1sh
Copy link
Member

What happened:
when multiple ENI exists on node prior to bootstrap, the IP address of ENI other than eth0 may be used and passed to kubelet.
Which then may fail kubelet's IP address validation

What you expected to happen:
we should always use eth0's IP address when generate node's IP.

How to reproduce it (as minimally and precisely as possible):
keep launch nodes with 2 enis, and sometimes node won't get IP.

Anything else we need to know?:
In https://github.com/awslabs/amazon-eks-ami/blob/master/files/bootstrap.sh#L430 we used the first MAC instead of eth0's mac.
i believe we should just use latest/meta-data/mac (The instance's media access control (MAC) address. In cases where multiple network interfaces are present, this refers to the eth0 device (the device for which the device number is 0).)

The code change was introduced in #773

Environment:

  • AWS Region: us-west-2
  • Instance Type(s): c5.9xlarge
  • EKS Platform version (use aws eks describe-cluster --name <name> --query cluster.platformVersion):
  • Kubernetes version (use aws eks describe-cluster --name <name> --query cluster.version):
  • AMI Version:
  • Kernel (e.g. uname -a):
  • Release information (run cat /etc/eks/release on a node):
@cartermckinnon
Copy link
Member

Proposed change makes sense to me. This would only effect ipv6, right? Because the MAC is only used in the ipv6 cases.

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 a pull request may close this issue.

2 participants