-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Support shim v2 e.g. for Kata Containers 2.0 #8579
Comments
Interested in opening a PR to fix. I am not sure if this would be easy unless we have a small wrapper OCI that would do the magic for us. Making the changes for podman to connect to a socket, would be a lot more invasive. |
Doing this properly would be a pretty significant endeavour - we do have an OCI runtime abstraction but some aspects of our current pattern (e.g. Conmon) are baked deeply into parts of Libpod, including the aforementioned abstraction interface. |
A friendly reminder that this issue had no activity for 30 days. |
A friendly reminder that this issue had no activity for 30 days. |
A friendly reminder that this issue had no activity for 30 days. |
BTW, the alternative is to get crio supported in nerdctl. |
A friendly reminder that this issue had no activity for 30 days. |
If this is still wanted and can be added, I would like to give it a try. Based on the comments it seems it is not an easy task, so it might take me some time to understand and get the required changes, but if that's not a problem I'm ok with start doing something here. |
If you’re willing to take a shot, go for it! We can probably do this in
pieces, migrate support in parts (stuff like attach handling is especially
hard to get right, for example)
…On Sat, May 8, 2021 at 14:00 Eduardo Vega ***@***.***> wrote:
If this is still wanted and can be added, I would like to give it a try.
Based on the comments it seems it is not an easy task, so it might take me
some time to understand and get the required changes, but if that's not a
problem I'm ok with start doing something here.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#8579 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB3AOCEPIEVZMP7KHCBOIMDTMV3Z7ANCNFSM4UMDU45Q>
.
|
@mheon understood. So the idea would be to implement a shimv2 client, so that shims like
In this case For the initial work, what would you consider can be a good start ? I was thinking to start with a very simple create / start operation I hope this makes sense. |
Sure. This sounds reasonable. It should give us an idea of how complex this
could get.
…On Tue, May 11, 2021 at 20:37 Eduardo Vega ***@***.***> wrote:
@mheon <https://github.com/mheon> understood.
So the idea would be to implement a shimv2 client, so that shims like
containerd-shim-kata-v2 can be used with podman.
podman -> OCI wrapper -> shimv2 -> ctrs
In this case conmon wouldn't be part of this, since the shim should take
care of the container?
For the initial work, what would you consider can be a good start ? I was
thinking to start with a very simple create / start operation
I hope this makes sense.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#8579 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB3AOCAO6MZZSAIRAF6RGGDTNHEV5ANCNFSM4UMDU45Q>
.
|
A friendly reminder that this issue had no activity for 30 days. |
Still working on this. I've been able to get some progress and now trying to get a minimal attach workflow working (podman run without |
A friendly reminder that this issue had no activity for 30 days. |
@EduardoVega What is going on with this? |
@rhatdan I haven't been able to get any progress for the last weeks due to the lack of time, but I should be able to start working on this and finalize what I have done so far for the initial PoC |
@EduardoVega Any progress? |
A friendly reminder that this issue had no activity for 30 days. |
So with katav1 no longer available on fedora i was wondering if it would make sense to bring it back as if this doesn't get implemented we're effectively without any kata containers support for podman. Would it be reasonable to say that the v1 kata-containers package would work with podman if built manually? |
It certainly should, or if someone create a katav2 executable which talked to the Kata API and just implemented a wrapper on crun. Since CRUn processes the OCI Runtime, this might be the easiest thing to do. |
@vrothberg WDYT? |
A friendly reminder that this issue had no activity for 30 days. |
A friendly reminder that this issue had no activity for 30 days. |
I don't think this is a Podman issue, if someone wants to write an executable OCI that talks the kata ship, then Podman would gladly execute it. I don't think there is much value in Podman talking the API directly. |
@rhatdan I'd appreciate you explaining your thinking further. Is your thinking that supporting Shim v2 is something Podman should never need to do, or just not now? After all Podman is "a daemonless container engine for developing, managing, and running OCI Containers on your Linux System." As I understand it, Shim v2 is designed to be a superior API to v1 for running OCI containers, and this is why the Kata team dropped support for v1. So, if Podman exists to manage OCI containers, why should it not wish to support Shim v2? |
For what it is worth, Kata Containers is a primary application of the shimv2 interface, and the community actively rejected the idea of supporting the CLI. So @dgibson and myself started working on a youki-based wrapper that takes OCI command line as input and calls the shimv2. This is not straightforward, because the shimv2 interface, unlike the command-line interface, is not expected to be invoked from multiple processes. FWIW, not having podman support has caused the Kata community to lose interest and shift to other tools such as |
I would fully support youki or crun gaining support. I just don't want to add the bloat to Podman to support this API. When having a separate application that Podman already knows how to execute available does the same thing. Saying shimv2 does not support multiple processes communicating with it, does not make it have podman with built in support versus launching an OCI cli any better or worse. |
nerdcll would have the same attributes as an OCI, in that it can come from multiple different processes correct? |
I believe that the initial intent of the API (not saying it was realized) was that it would be a simpler replacement, so it would not cause bloat. But I think that in the current state of thing, it's safe to say that you could not get rid of the command-line API.
It does (slightly) in cases where there are multiple calls for one operation, e.g. typically at container creation time, or operations that deal with multiple containers (where I think that you could do it with a single API RPC channel open from podman, as opposed to one cli command per container, which would then need to reconnect to the same RPC endpoint repeatedly). Not having fully implemented the wrapper yet, I cannot fully evaluate the cost of that, though. |
The problem with |
I'm sharing the following in case it's helpful to anyone who, like us, needed VM isolation for their container workloads, a virtiofs-based solution (ruling out Kata v1) and compatibility with Due to issues like this one, experienced using Docker/Podman CLI to launch Kata Containers, we built RunCVM (Run Container VM): an experimental open-source Docker container runtime, for launching standard container workloads in VMs. Please note that RunCVM is not a direct competitor to Kata: as an experimental runtime, RunCVM cannot offer the same levels of stability and support as Kata. However RunCVM may be suitable for some use cases and is compatible with |
Does RunCVM support the same CLI as runc? |
/kind feature
Description
Adding support for the shimv2 interface https://alibaba-cloud.medium.com/cri-and-shimv2-a-new-idea-for-kubernetes-integrating-container-runtime-ab8d22f5716b, useful for example for Kata Containers version 2.0 which no longer supports the earlier CRI interface (see kata-containers/kata-containers#1133 (comment)).
Steps to reproduce the issue:
That works with kata being
kata-runtime
(Kata Containers version 1.0) but not withcontainerd-shim-kata-v2
(Kata Containers version 2.0).Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide?
No (but I don't expect the latest has the fix, not having seen a mention of "shim v2" in the issues)
Additional environment details (AWS, VirtualBox, physical, etc.):
Physical with Kata
Note
Kata Containers is considering doing the opposite, which is to restore the original CLI commands, see kata-containers/kata-containers#722. However, that would lead to a more inefficient setup (multiple shims), so the shimv2 interface remains interesting in the long run.
The text was updated successfully, but these errors were encountered: