Comments (5)
Debian maintainer for crun and WasmEdge, and comaintainer for podman here :)
I think this is a bit of a "crun API" question that applies to both what crun is intended to ship, and thus what podman should be be using. Basically:
- As far as I can tell, crun does not look at argv[0], and the build system does not install a crun-wasm symlink. The main crun binary simply dlopen()s libwasmedge (etc.).
- The crun RPM spec does install a symlink, in a separate "crun-wasm" package, that also depends on WasmEdge.
- In Debian, we configure with WasmEdge but do not ship a crun-wasm package, nor a symlink at the moment. The "crun" package Suggests: libwasmedge0.
- However, as evident by Eugen's bug report, podman seems to rely on the existence of "crun-wasm" in the $PATH. This is a change in behavior compared what it used to in the past (and hence, a regression: wasm containers used to work out-of-the-box in Debian; now they don't).
Our goal as integrators/distributors is to minimize divergence with upstream, and ideally with other distributions, and install binaries where folks will expect them to be, and to avoid unnecessary cruft.
It is not super hard to follow the RPM packaging here. However, the fact that this symlink business happens only in the RPM spec and not e.g. in Makefiles, gives me pause. The solution does not seem super clear either: crun has all kinds of other dynamically loaded (dlopen) features (e.g. criu), are we supposed to create a matrix of symlinks in that way? Plus, how is this all going to fit with UAPI's ELF notes implementation for dlopen'ed dependencies, cf. systemd/systemd#32234?
So all in all, I think we're in a situation where the crun/podman upstreams are perhaps not fully in-line? Is a /usr/bin/crun-wasm symlink part of "crun's API" for container engines? Or should podman attempt to use /usr/bin/crun for wasi instead of, or in addition to, /usr/bin/crun-wasm?
from crun.
from crun.
So if I'm hearing you right, we should be shipping /usr/bin/crun-wasm -> crun in Debian -- either in the same "crun" package, or a separate "crun-wasm" package.
That's trivial to do in the Debian packaging (literally one line), but I'm wondering, shouldn't crun's "make install" also install this symlink for any other downstream users?
yes, I agree it is better to fix it in the crun Makefiles so it works also for users using make install
from crun.
So all in all, I think we're in a situation where the crun/podman upstreams are perhaps not fully in-line? Is a /usr/bin/crun-wasm symlink part of "crun's API" for container engines? Or should podman attempt to use /usr/bin/crun for wasi instead of, or in addition to, /usr/bin/crun-wasm?
we used a custom annotation before to tell crun to run the container in "wasm mode". That is still possible, but it is a kind of a crun specific hack.
Differently, I think having different names for the runtimes is clearer for the users of the OCI runtime as it appears like a different runtime. The fact that it is a symlink is just an implementation detail, the crun-wasm
runtime could be something completely different.
From the Podman PoV, or any other engine, they are really using two different runtimes (crun
and crun-wasm
) so there is no special handling needed, no custom annotation or anything else. Just use a different binary.
from crun.
Thanks for the quick response! This makes sense :)
So if I'm hearing you right, we should be shipping /usr/bin/crun-wasm -> crun in Debian -- either in the same "crun" package, or a separate "crun-wasm" package.
That's trivial to do in the Debian packaging (literally one line), but I'm wondering, shouldn't crun's "make install" also install this symlink for any other downstream users?
from crun.
Related Issues (20)
- crun: bpf create ``: Invalid argument HOT 2
- #21520 crun not working with pterodactyl wings HOT 6
- Read-only file volumes fail on fedora 39 with docker HOT 5
- How to verify downloaded binaries? HOT 2
- Release v1.14.4 HOT 2
- unrecognized option '--keep' when using crun for building docker images HOT 2
- Example Config HOT 1
- Crun not starting in amd64/x86_64 docker container on Apple Silicon HOT 3
- crun 1.14.4: `Error: OCI runtime error: crun: Error relocating /usr/bin/crun: statx: symbol not found` HOT 3
- BPF create error when use debian bullseye kernel >= 5.10.0-26-amd64 HOT 1
- Discrepancy between crun and runc when disallowing access by default to devices with cgroups v1 HOT 5
- Does not ignore SIGWINCH if no terminal is allocated
- container create failed: sd-bus call: Cannot set property CPUQuotaPeriodUSec, or unknown propert HOT 8
- Compilation error with clang++ 17 HOT 3
- Missing libsystemd headers on Alpine Linux v3.19 HOT 2
- Version 1.14.5 HOT 1
- [packit] Propose downstream failed for release 1.15 HOT 2
- Container creation fails with read-only bind mount HOT 3
- Different CRUN/RUNC cgroup hierarchy HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crun.