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

Add support to set loopback to up #10238

Merged
merged 1 commit into from
May 20, 2024

Conversation

MikeZappa87
Copy link
Contributor

The CNI maintainers intend on deprecating the loopback plugin. This approach where we set the lo interface to up is similar to what CRI-O does. We (@mikebrow ) decided to have a flag to disable/enable and eventually we will go with removing the flags and just always setting the lo interface to up.

@k8s-ci-robot
Copy link

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@samuelkarp samuelkarp added the area/cri Container Runtime Interface (CRI) label May 16, 2024
@MikeZappa87 MikeZappa87 force-pushed the feature/provideinternalloup branch 5 times, most recently from 98c78a9 to b8d85c8 Compare May 16, 2024 22:50
@aojea
Copy link
Contributor

aojea commented May 16, 2024

yay 👏

@MikeZappa87 MikeZappa87 force-pushed the feature/provideinternalloup branch 2 times, most recently from 0e74629 to 996733d Compare May 16, 2024 23:15
@MikeZappa87
Copy link
Contributor Author

yay 👏

I had this on my queue for so long, figured I would just get it done.

@MikeZappa87 MikeZappa87 marked this pull request as ready for review May 16, 2024 23:16
@MikeZappa87 MikeZappa87 requested a review from mikebrow May 16, 2024 23:17
@MikeZappa87 MikeZappa87 force-pushed the feature/provideinternalloup branch 4 times, most recently from b8f2dea to 218f6c7 Compare May 17, 2024 04:23
@aojea
Copy link
Contributor

aojea commented May 17, 2024

I'm not familiar with the conventions of containerd for new APIs and config fields or the introduction of deprecations, so I can not judge that, but technically this LGTM

eventually we will go with removing the flags and just always setting the lo interface to up.

I still have question though that I think is worth to test it, what happens if an user uses this new option but still has the loopback cni plugin, if both loopback are configured are there any bad interactions or is a noop when a pod is created and runs both of them?

@MikeZappa87
Copy link
Contributor Author

I'm not familiar with the conventions of containerd for new APIs and config fields or the introduction of deprecations, so I can not judge that, but technically this LGTM

eventually we will go with removing the flags and just always setting the lo interface to up.

I still have question though that I think is worth to test it, what happens if an user uses this new option but still has the loopback cni plugin, if both loopback are configured are there any bad interactions or is a noop when a pod is created and runs both of them?

The community CNI plugin just sets the lo interface to up. Cilium and Calico for example set the lo to up as well. I believe only flannel doesn't set it to up. This should not be impactful. Hopefully the users follow the upgrade instructions as well. However since the field defaults to the legacy behavior we should not see any issues.

@mikebrow mikebrow self-assigned this May 17, 2024
@mikebrow
Copy link
Member

mikebrow commented May 17, 2024

/test pull-containerd-k8s-e2e-ec2

checking if "cmd: failed to assign an IP address to container" was a flake..

@MikeZappa87
Copy link
Contributor Author

/test pull-containerd-k8s-e2e-ec2

Copy link
Member

@henry118 henry118 left a comment

Choose a reason for hiding this comment

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

LGTM. Just a minor nit on spacing :)

docs/cri/config.md Outdated Show resolved Hide resolved
Copy link
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

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

see comment on migration test in integration...

A nice to have here would be a test bucket for the config switch enabled vs disabled.. maybe an exec into busybox that uses localhost.. checks the result.

integration/client/testdata/default-1.6.toml Outdated Show resolved Hide resolved
Signed-off-by: Michael Zappa <michael.zappa@gmail.com>
@MikeZappa87
Copy link
Contributor Author

image
I manually tested this with 'use_internal_loopback = true'

lo was up.

@MikeZappa87
Copy link
Contributor Author

/test pull-containerd-k8s-e2e-ec2

@MikeZappa87 MikeZappa87 marked this pull request as draft May 18, 2024 03:41
@MikeZappa87 MikeZappa87 marked this pull request as ready for review May 20, 2024 01:14
Copy link
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

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

LGTM

@mikebrow mikebrow added this pull request to the merge queue May 20, 2024
Merged via the queue into containerd:main with commit 87bab6c May 20, 2024
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cri Container Runtime Interface (CRI) size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants