Skip to content

gVisor w/ containerd v2.x #11319

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

Closed
milantracy opened this issue Dec 23, 2024 · 13 comments
Closed

gVisor w/ containerd v2.x #11319

milantracy opened this issue Dec 23, 2024 · 13 comments
Assignees
Labels
type: enhancement New feature or request

Comments

@milantracy
Copy link
Contributor

Description

integrate gVisor with containerd v2.x

would be good to start with, while I don't expect a significant number of changes on gVisor.

Is this feature related to a specific bug?

No response

Do you have a specific solution in mind?

No response

@milantracy milantracy added the type: enhancement New feature or request label Dec 23, 2024
@milantracy milantracy self-assigned this Dec 23, 2024
@ayushr2 ayushr2 marked this as a duplicate of #11308 Dec 24, 2024
@lorenz
Copy link
Contributor

lorenz commented Jan 9, 2025

https://github.com/monogon-dev/monogon/blob/main/third_party/go/patches/gvisor-containerd-compat.patch is what we're using, most things work fine with that.

@milantracy
Copy link
Contributor Author

Thanks a lot @lorenz

@smira
Copy link

smira commented Apr 3, 2025

I tried adapting @lorenz patch above to latest gvisor code, but still same symptoms - the pods are stuck in terminating phase, runsc* processes are still running siderolabs/extensions#663

@samuelkarp
Copy link
Member

It looks like this is a bug in containerd. We've merged a fix in containerd/containerd#11741 and it should be in the next 2.0.x release (2.0.6).

@milantracy
Copy link
Contributor Author

I tested and verified that gvsior behavior is working pro once the fix is patched.

@lubex96
Copy link

lubex96 commented May 12, 2025

Hi colleagues,

Can you please confirm if the fix discussed here will be available in containerd v2.1.0?

Thanks!

@smira
Copy link

smira commented May 19, 2025

Please note the change got reverted in containerd 2.1.0: containerd/containerd#11793

@milantracy
Copy link
Contributor Author

The PR you linked is the new fix, which I have verified that it works

@smira
Copy link

smira commented May 19, 2025

The PR you linked is the new fix, which I have verified that it works

We're observing some issues with Talos Linux and gvisor/containerd 2.1.0:

I will update once I know more, but it seems to be a different issue linked to gvsior pod shutdown.

@milantracy
Copy link
Contributor Author

@smira can you verified that Talos works with https://github.com/containerd/containerd/tree/release/2.0

I am working on containerd/containerd#11828 to cherry pick the change into 2.0.x release, it will be helpful if you can share more on what went wrong on your side

@smira
Copy link

smira commented May 19, 2025

I can verify that containerd 2.0 works with the patch from the original PR with gvisor: https://github.com/siderolabs/pkgs/tree/release-1.10/containerd/patches

The restart patch is not relevant here.

@smira
Copy link

smira commented May 19, 2025

@milantracy the tests seem to pass now for Talos main with container 2.1.0 and a "hacky" patch from siderolabs/pkgs#1235: https://github.com/siderolabs/talos/actions/runs/15118232352/job/42494829782?pr=11024

I don't have any details (yet), but there's definitely something missing.

@smira
Copy link

smira commented May 20, 2025

So I can see that the following process is "left" once the gVisor pod terminated with contianerd 2.1.0:

172.20.0.5  7490  S      9        0.02      1.3 GB   14 MB   system_u:system_r:pod_containerd_t:s0  /usr/local/bin/containerd-shim-runsc-v1 -namespace k8s.io -address /run/containerd/containerd.sock -publish-binary /usr/bin/containerd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants