-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[Feature]: Implement the shimv2 protocol into C to support newer versions of Kata Containers #17070
Comments
IMO this should be done with a different program that behaves like an OCI runtime and it talks internally to kata using the shimv2 protocol. In this way it can be used transparently with Podman without requiring any change. I would not add the shimv2 protocol to Podman itself for a couple of reasons: 1) it adds more dependencies that affect the binary size, and 2) it is a containerd thing, it is not a standard. |
I tend to agree. The Kata runtime seems like it could provide an OCI-compatible CLI interface, which would resolve this problem. |
Os someone create a CLI Library that can talk to shim V2 and use crun to parse the OCI Runtime Specification. |
From an outsider's perspective, I agree that it makes sense for this to be a separate program that presents an OCI compliant runtime, but talks shimv2. Some comments (1, 2) on the kata issue tracker indicate that @c3d and @dgibson had been working on it, at least in the past. Like others, I was burned by kata's breaking change to no longer support the OCI runtime spec. I'm now using krun (crun built with libkrun support), which gives me similar VM isolation via an OCI runtime, the way kata 1.x worked. If anyone sees this issue wishing podman worked with kata, you may wanna give that a try. |
This is the fourth "notification" I receive about Kata Containers + podman this week, Probably time to revive my effort on writing an OCI-compliant wrapper for the shimv2 interface (what we called "ociplex" in the past). |
Yeah, might be. I really have zero interest in working on this, but you're welcome to the scant bits of made when I was working on it.
Overall, I think libkrun has a considerably better thought out design than Kata. Note however that there is a difference in model: Kata works on a one-VM-per-pod model whereas libkrun works on a one-VM-per-container model. libkrun's (very clever) in-kernel socket interception stuff makes it possible to do that with mostly similar semantics, but there are likely quite a few edge cases where they will behave differently. Perhaps more importantly, the performance characteristics may be significantly different between the two for pods with more than one container. |
I spent a little bit of additional time on this today. Here is the summary of my findings:
|
Not all that surprising. Note that I wasn't anticipating using the guts of
AIUI, the Kata agent already uses Google protobuf / gRPC to talk to the agent. We should be able to use the same library to talk shimv2.
Well.. it's "mandated" in the sense that a shimv2 server must support the option but not, AFAICT, in the sense that a shimv2 client must use it. We should be in the latter case, so I think we can just ignore it.
|
A friendly reminder that this issue had no activity for 30 days. |
Any updates? |
Well, I have mostly focused on reviving On the I also ran various experiments to try and figure the exact interaction between I also tried unsuccessfully to The current work is on implementing the shim v2 interface from |
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 it support same CLI as RUNC and CRUN? |
Yes, it piggybacks RUNC to make KVM launch inside a container. |
I close this as I really do not see us doing this in podman anyway. If someone makes a cli compatible oci runtime it should work without podman changes |
Hello, i'm confused about the KATA/Podman developpement, and the documentation. If i understand correctly, the Kata runtime will not be supported anymore, at least directly, by podman My understanding from https://docs.redhat.com/en/documentation/openshift_container_platform/3.11/html/cri-o_runtime/use-crio-engine is that i can use podman with Kata using the following stack : Podman -> CRI-O -> KATA The following part of the documentation seem to imply that it would work :
I understand that CRI-O officially support KATA runtime ; what confuse me, is the relation between CRI-O and podman (and maybe the overlap/complementarity of crictl/runc tools). If Podman does not support CRI-O in the way i understood, should podman be dropped completly in favor of containerd or crictl to run kata containers ? Regards, |
You are incorrect. Podman does not use CRI-O as a backend; we have our own backend code. Podman cannot interact with the CRI at all. We interact with OCI runtimes directly. Until Kata creates an OCI compatible runtime, Podman will not be able to support it. |
If you want similar functionality to Kata take a look at krun. |
Thanks for the krun tip, it looks interesting. Also for similar functionality to Kata, look at https://github.com/newsnowlabs/runcvm, which has experimental support for Podman. |
Feature request description
Bottom line for Podman is it knows how to exec an OCI runtime based on runc. It can work with runc, crun, krun, gVisor and kata (v1). No one has implemented an OCI runtime which talks shimv2 protocol leaving users with old versions of Kata Containers. The usage of these versions is not supported anymore and highly discouraged by the maintainers (kata-containers/kata-containers#722 (comment)).
The goal is to make the first step to achieve parity in Kata Container workflows where podman is used locally during development and deployed on a cluster for production purposes.
Suggest potential solution
No response
Have you considered any alternatives?
The only potential alternative is using Kata Containers v1 which still supports the earlier CRI interface as described here kata-containers/kata-containers#1133 (comment)
There is also an open issue to re-add OCI CLI command for Podman at Kata Containers but there seems to be no progress so far (kata-containers/kata-containers#722).
Additionally Kata Containers v1 is not supported anymore and usage is highly discouraged by its maintainers leaving no viable alternative left.
Additional context
shimv2 API is similar but not equal to the OCI runtime API as it provides different verbs during the container life cycle. While both are used to manage containers, the value added by shimv2 is that it can launch both Pods (multiple containers) and OCI compatible containers with a single runtime shim.
Due to the fact the shimv2 is not a standard and quite specific to containerd it was decided to not implement special case code in Podman as described here #8579
The text was updated successfully, but these errors were encountered: