I have a podman container which used to run on Ubuntu Focal (20.04) and Ubuntu Jammy (22.04) (using podman 3.4.4+ds1-1ubuntu1.22.04.3_, and now I am trying to use it on Ubuntu Noble (24.04) (using podman 4.9.3+ds1-1ubuntu0.2).
In the container, it eventually calls a command similar to this one, which fails:
root@host:/# ip tuntap add testdev mode tap
ioctl(TUNSETIFF): Operation not permitted
This command works outside the container. It also worked when running the container on Focal.
The usual possible causes that one finds with google do not seem to apply:
/dev/net/tunis present inside the container- CAP_NET_ADMIN is set, in fact, the container already runs with
--privilegedfor other reasons. - I tried adding
--cap-add=ALLto the podman command anyway, but it made no difference. - apparmor is not blocking the action. It still fails when the apparmor profile is set to "complain mode".
Further aguments to podman include --network host, --security-opt=apparmor=our-own-profile (but for testing I set it to complain mode so it should not block anything), --user nova --userns=keep-id, --storage-opt "overlay.mount_program=/usr/bin/fuse-overlayfs".
The container is based on Ubuntu Bionic (18.04).
I was at some point suspecting a possible ABI incompatibility between the ip command inside the container and the Noble host. But when I copied the ip command inside the container to the outside, it worked fine to create the testdev tap device.
I looked at the kernel source code drivers/net/tun.c of a recent kernel tree to see if any restrictions had been added recently, but this file seems fairly constant over the years.
Any ideas what other things I can check?