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

AWS VPC CNI Ubuntu 22.04 MACAddressPolicy #16255

Closed
Deshke opened this issue Jan 16, 2024 · 5 comments · Fixed by #16313
Closed

AWS VPC CNI Ubuntu 22.04 MACAddressPolicy #16255

Deshke opened this issue Jan 16, 2024 · 5 comments · Fixed by #16313
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@Deshke
Copy link

Deshke commented Jan 16, 2024

/kind feature

1. Describe IN DETAIL the feature/behavior/change you would like to see.

via

until aws/amazon-vpc-cni-k8s#2118 is working the following Policy should be applied to get 22.04 working with aws vpc cni

https://github.com/awslabs/amazon-eks-ami/blob/master/scripts/install-worker.sh#L104

# Temporary fix for https://github.com/aws/amazon-vpc-cni-k8s/pull/2118
sudo sed -i "s/^MACAddressPolicy=.*/MACAddressPolicy=none/" /usr/lib/systemd/network/99-default.link || true

or from aws/amazon-vpc-cni-k8s#2103 (comment) which may be used with fileAssets

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Jan 16, 2024
@hakman
Copy link
Member

hakman commented Jan 16, 2024

Does this require networking restart in Ubuntu?

@Deshke
Copy link
Author

Deshke commented Jan 16, 2024

yes

@moshevayner
Copy link
Member

Hey @hakman !
I can take that as part of my open PR (#16191 ), or alternatively- as a separate PR and then I can rebase my PR's branch to get the fix into it.

I looked around in the code, and from what I could see, the best place to add this would probably be in the launch template of an instance here, probably wrapped inside an if block to only apply that if the CNI is AWS VPC CNI.
WDYT?
Would you say there a better approach for this?
Thanks!

@hakman
Copy link
Member

hakman commented Jan 28, 2024

@moshevayner To my knowledge, all AWS VPC CNI tests run on Ubuntu 20.04, so they should not be affected by this issue. I would suggest to try and move #16191 to v1.16.2 and see what happens.

If you want to try to fix this in a separate PR, I think it would be a good idea.
The change needs to happen in nodeup code, similar to the code below, and run systemctl restart systemd-networkd on change:

c.AddTask(&nodetasks.File{
Path: "/etc/sysctl.d/99-k8s-general.conf",
Contents: fi.NewStringResource(strings.Join(sysctls, "\n")),
Type: nodetasks.FileType_File,
OnChangeExecute: [][]string{{"sysctl", "--system"}},
})

@moshevayner
Copy link
Member

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants