Closed jwhb closed 1 year ago
cc: @giuseppe
OCI image annotations MUST NOT be propagated to the runtime as it would open up security issues, an image could configure the runtime differently. This should be solved differently, in Podman we can register a different oci runtime when a different arch is specified, in this case should be wasi/wasm
@mheon isn't it a problem that Podman currently propagates the image annotations down to the OCI runtime?
here is the config.json created by podman run docker.io/wiegratz/hello-rust:wasm (OCI image does have the compat annotation). Podman copied the image annotation into config.json .annotations
tagging @vrothberg as well
Agreed, this needs fixing.
@giuseppe: Aside from the risks associated with propagation of OCI annotations; is this annotation (module.wasm.image/variant=compat-smart
) unsafe?
If not, should it not be whitelisted or whitelistable for propagation in CRI-O, so that CRI-O behaves like Podman currently does with the Wasm use case?
we could allow only that annotation, since it is not a risk, but I think long term is better if CRI-O behaves like Podman and treats images with the wasi/wasm arch as wasm instead of relying on magic annotations
yeah I'd like to move to use arch instead as well
A friendly reminder that this issue had no activity for 30 days.
FWIW @sohankunkerkar is going to make sure CRI-O properly sets up a arch: wasi image if crun-wasm is enabled
A friendly reminder that this issue had no activity for 30 days.
I believe we can close this as @sohankunkerkar managed to test and CRI-O is able to create wasm containers when the platform is set on the image and crun-wasm is chosen
It's still not fixed yet.
this could potentially be a security issue, are you sure it is what you want to do anyway?
I'd leave the issue closed and not try to address it.
We have decided not to support annotations and instead, we will enable running wasm
containers by introducing an additional field named platform_runtime_paths
within the RuntimeHandler configuration.
https://github.com/cri-o/cri-o/pull/7180
What happened?
cri-o is configured to use crun with
+WASM:wasmedge
.When a Kubernetes Pod with an OCI image with .wasm file and
module.wasm.image/variant=compat-smart
annotation is scheduled, cri-o does not propagate the image annotation to crun.crun then fails to switch to wasmedge, leading to:
config.json
of container:What did you expect to happen?
cri-o propagates OCI image annotation
module.wasm.image/variant=compat-smart
to crun, so that crun knows that the OCI image needs a Wasm runtime.How can we reproduce it (as minimally and precisely as possible)?
In OpenShift worker Node with cri-o:
In OpenShift:
I can not just create a pod/container (with
crictl create
) directly on CoreOS due to Multus.Anything else we need to know?
On the same cri-o host it works with Podman (configured to use crun):
CRI-O and Kubernetes version
OS version
Additional environment details (AWS, VirtualBox, physical, etc.)