-
Notifications
You must be signed in to change notification settings - Fork 374
Requirements for merged kata runtime #31
Comments
I added @tallclair @WeiZhang555 @sameo in the doc with edit permission, and you can invite others. |
@gnawux Maybe it's a good idea to start discussing about those requirements here instead? Here is my proposal: [DRAFT v5] [See changelog at the bottom of this page] Mandatory requirementsThe Kata Containers runtime MUST fulfill all requirements below: OCI compatibilityThe Kata Containers runtime MUST implement the OCI runtime specification and support all the OCI runtime operations.
|
@sameo you could just edit the google doc, it is not easy to collaborate writing a document in an issue. |
@gnawux Your suggestion about opening a PR for adding this as a document would be good. Folks can then comment on it and it can be rebased to take input into account. |
@sameo feel it is a bit early to put a PR, others may input contents directly on the google doc. However, if you think it is the time, I could file a PR and merge both our drafts into it. |
@gnawux Since this is going to be part of our documentation, using a google doc for this sounds like an avoidable additional step. If this document would for sure not be merged to our documentation then a google doc would make sense, but here a PR makes more sense imho. |
@sameo Though I think it is better to make the doc looks ready before convert to a PR, It's not a big problem. I will submit the PR firstly for discussion. |
@sameo and all Do you guys think the requirement docs should be put into docs directory of this repo, or the document repo? If the latter, do we have a dir hierarchy of the repo yet? |
I kinda think the last part of that doc is very accurate, can we remove as many shim layers as possible and try to keep it simple :) |
Can you clarify the section on CRI support? It sounds like it's not saying that the runtime should be a complete implementation of the CRI, but rather that an implementation should be possible using it? Is OCI not sufficient for that? |
I think the document is trending towards describing architecture rather than defining requirements (ie, OCI compliance, provide an API/library suitable for a CRI like frakti, device hotplug, etc.). If/when I get permissions for editing I can help make some edits/add clarity. |
@tallclair Yes, that's what I was trying to say indeed. OCI is enough for CRI implementations like CRI-O or cri-containerd but e.g. Frakti does not rely on the OCI interface but rather on the runV API. The current docker-shim also does not rely on OCI. |
@sameo @tallclair while OCI can implement CRI support, its runtime spec may not be efficient enough for Kata Containers due to lack of proper storage description. When Kata Containers support cri-containerd/CRI-O via OCI (aka. the runc cli interfaces), it relies on 9pfs (which itself is slow and problematic -- we even have to hack 9pfs kernel module to reach POSIX compliance) to map local storage to the guest, and there is no description for remote storage in the spec. OTOH, the runV library API is more native for VM-based containers and favors CRI from design. In fact it was designed together with CRI. In that sense, runV is compatible with the OCI spec and provides extended APIs to better suit the need of CRI and VM-based containers. With the runv API, frakti is able to use both local block storage and remote storage more efficiently. So to amend the last paragraph of @sameo 's requirements list, I would suggest we change the requirement of Runtime API from
To Runtime Library APIWhile CRI-O and cri-containerd rely on runc compatible CLI, some CRI implementations like frakti rely on the runtime library API instead. The Kata Containers MUST provide a runtime library API favoring CRI design to support them. And it should be moved up right after the |
@tallclair as we mentioned CRI things, I would like to provide a detailed research of potential integration options of Kata and CRI shims in next sig-node meeting. Let's put all these problems on the table and see how they can be fixed. |
That is not entirely correct I'm afraid. With cc-runtime we do hotplug block based devices as local storage when the container overlay filesystem allows for it. So 9pfs is a fallback, not the default.
Yes, there is no such description in the OCI spec. But out of curiosity, is that specified in the current CRI spec? I don't see it but I may very well be missing something.
Done, thanks for the input. I did not change the order because I think all those requirements are mandatory. Instead I created an Optional requirements section to explicitly state which ones are mandatory and the runtime API is part of it. |
@sameo, thanks for updating the list! I still think we can put all CRI related requirements together instead of scattering them all over the doc. But that can be done in future updating.
Well, it's true that you can hotplug block devices if they are specified in the The problem is that with an OCI spec, rootfs and volumes are specified in
That is not defined by the CRI spec but can be supported via flexvolume. And there is ongoing change to support it in the CSI spec. |
Yes, that makes sense. I've merged the runtime api into the CRI support section. Please let me know how it looks now.
Sorry for the confusion, I should not have mentioned the hotplugging side of things here. We do vmm hotplug, but only for efficiency reasons. But |
@egernst @tallclair I've updated the |
I read this whole thread and I think there are some requirements none of you mentioned.
These are also important for working with K8S, and I know both cc and runv have experience on these. It's better to add some illustrations for them. |
Do you mean we want to support the dockershim CRI implementation, i.e. "K8S->dockershim->kata" ? |
Looks good. I'm a little unclear about the OCI compat / Another point - runc has particular options (like Also, how about adding something about logging / problem determination / debugging? Specifically the ability to determine easily that a problem originates in the runtime rather than one of the other components. We might benefit from some input from @chavafg for thoughts on Testing requirements. |
@sameo
Good point! This is also important part I really care about, and can be strong guarantee for quality and give more confidence to kata container developers and users. |
@jodh-intel Could you elaborate a little more on the logging/debugging ? |
@WeiZhang555 dockershim is moving out from kubelet, but I think a docker support is still a valid requirement. |
Thanks @sameo. Regarding logging, ideally the runtime would use structured logging (as provided by https://godoc.org/github.com/sirupsen/logrus, for example), such that one of the log fields would specify "runtime" or "kata-runtime" to allow consumers of the system log to determine that an error was being generated by the runtime (as opposed to the shim/proxy/agent/hypervisor). Also, every time an OCI command is called, it would be extremely useful if the runtime could also log its version and the commit it was built with. That shouldn't necessarily be required for every log call but since an OCI command delineates a block of log calls, that should be sufficient. In summary: a quick a) if there were any errors. |
@gnawux It seems that dockershim is indeed moving out, but afaik CRI is now mandatory for kubelet so the legacy Docker runtime is no longer supported. |
@sameo what's the difference between dockershim and docker from kata's view? One more thing, I think one of the most significant differences between different client could be the networking part. @WeiZhang555 could you have some input on the networking related requirements? |
|
@egernst yes, at least, we need CNI at first, and 2-5 looks no problem. |
@egernst This looks fine. CNI should be more important for K8S integration. We can discuss more about networking part later, to find a good way for doing this. |
@WeiZhang555 yes, for kubernetes faced scenarios, we don't need CNM. And all the existing CNM implementations for runV or CC could be summarized as "workaround" so far. |
From kata's view it's almost identical as the kata runtime ends up being called as a Docker runtime. But from a development/integration perspective it's different: dockershim is a CRI implementation and by adding hardware virtualization awareness to the spec, we can have dockershim taking it into account and eventually calling Docker with e.g. the right annotations. |
@egernst @WeiZhang555 @jodh-intel I think I captured all your input, please let me know if that's not the case yet. |
Thanks @sameo - lgtm |
Adding to documentation repo -further review should happen there. Please see kata-containers/documentation#17 |
…_makefile build: Add a Makefile
Here is a draft of requirements (working in progress).
https://docs.google.com/document/d/109pxj-90Ly58ma8CoeRKcMoPWBD0G911E53MeK2zhhA/edit?usp=sharing
Currently, it listed some of the working scenarios for the runtime, and more sections should be added.
Once we have agreement on the requirement, the doc should be put into repo as a markdown doc.
The text was updated successfully, but these errors were encountered: