T7133: Add slirp4netns podman dependency for rootless networking support#4332
T7133: Add slirp4netns podman dependency for rootless networking support#4332Firefishy wants to merge 1 commit intovyos:currentfrom
Conversation
|
👍 |
|
We build podman from sources https://github.com/vyos/vyos-build/blob/3d24c1077e1a6e368bd380b7a4952d4e4bc4c2e3/scripts/package-build/podman/package.toml#L3 What will solve this PR? Could you provide example of the VyOS CLI where it is used? |
|
CI integration ❌ failed! Details
|
The debian slirp4netns package works with the VyOS build of podman. If VyOS moved to podman 5.x+ then I'd be happy to redo this PR to instead build the passt/pasta package (podman 5.x+ replacement for slirp4netns) Example run without slirp4netns installed vyos@gate:~$ podman --version
podman version 4.9.5
vyos@gate:~$ podman run -it --rm ubuntu
Resolved "ubuntu" as an alias (/etc/containers/registries.conf.d/shortnames.conf)
[...]
Error: could not find slirp4netns, the network namespace can't be configured: exec: "slirp4netns": executable file not found in $PATH
WARN[0002] Failed to add pause process to systemd sandbox cgroup: dbus: couldn't determine address of session bus
vyos@gate:~$ [failed to start container]And after install slirp4netns is installed: vyos@gate:~$ slirp4netns --version
slirp4netns version 1.2.0
commit: 656041d45cfca7a4176f6b7eed9e4fe6c11e8383
libslirp: 4.7.0
SLIRP_CONFIG_VERSION_MAX: 4
libseccomp: 2.5.4
vyos@gate:~$ podman run -it --rm ubuntu
root@ce94031c9e39:/# echo hello world from container
hello world from container
This is a step to allow under privileged users processes to launch containers, rather than current setup where all containers need to be launched by root. All containers currently run by VyOS run podman as root, the podman process can then set the container to a specific uid as defined by Redhat describes why rootless containers are a good idea better than I could. |
|
I’d try to build image with v5 version and check smoke tests. |
|
@sever-sever Do you plan to build it and try, or you want the PR author to build it? |
@dmbaturin I need at least an example of a config that does not work in the current version, to compare them We can build the 5 version, but it requires |
|
At the moment the only example I can share is that the default Adding an vyos config option to allow running containers as another user (underprivileged) is currently beyond me (time, commitment, knowledge). |
|
@Firefishy, we do not use native commands to configure podman, all configurations should be done via CLI Do you want just start containeres without VyOS CLI? It is not option |
Podman >= 5.x you need
Yes for now without, but next step would be to add VyOS CLI support. I really don't like running containers as |
dmbaturin
left a comment
There was a problem hiding this comment.
Since it's a PR to the VyOS CLI package, I don't see a point in merging it without the CLI. People who are willing to do things by hand can also install the package by hand.
A question, though: if it's going to be different for Podman 5.x, should we go this route? Any reasons why we shouldn't update to Podman 5.x in the rolling release? @sever-sever, what do you think?
I'm not against it. Just needs to update the podman version + build own |
|
Things are going to change in Podman 5, so this PR will almost certainly need to be done in a very different way. We can get back to it when we migrate to it (with Debian Trixie wholesale or just Podman 5). If you have CLI ideas, please share them. We can later work together to add a rootless networking CLI. |
Change summary
Add slirp4netns podman dependency for rootless networking support
Types of changes
Related Task(s)
https://vyos.dev/T7133
Related PR(s)
How to test / Smoketest result
Checklist: