-
Notifications
You must be signed in to change notification settings - Fork 557
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EPERM when opening /dev/net/tun
in 1.8.0-beta.0 (tested in QEMU provisioner cluster)
#9309
Comments
/dev/net/tun
in 1.8.0-beta.0 QEMU provisioner cluster/dev/net/tun
in 1.8.0-beta.0 (tested in QEMU provisioner cluster)
This is likely caused by this runc change. I am not sure if the pod spec can be changed or if containerd or kubelet need to be patched. |
containerd used to include tun/tap in its default allow list, but it also has removed it (2 years ago!) in this PR. |
One workaround (or arguably correct approach) is to use a device plugin, such as https://github.com/squat/generic-device-plugin or https://gitlab.com/arm-research/smarter/smarter-device-manager, and expose net/tun that way. I've tested with generic-device-plugin with this manifest and it works:
|
Provide tun devices to the cluster. See siderolabs/talos#9309
I don't think that Talos can (should) do anything about this, but it probably merits a call out in the release notes. This is going to cause some pain, especially since runc 1.2x is not widely deployed yet. |
Yes, thanks, I guess it's worth an additional release notes item. But it was some grey area before - do you need to be privileged or not, e.g. |
Fixes siderolabs#9309 Co-authored-by: Jean-François Roy <[email protected]> Signed-off-by: Andrey Smirnov <[email protected]> (cherry picked from commit 7bd26df)
Bug Report
Description
In a brand new test cluster created with the qemu provisioner with talos v1.8.0-beta.0, in a test pod that should be able to open /dev/net/tun, it will fail with EPERM.
If you repeat the same steps with v1.7.6, you will be able to open /dev/net/tun.
This is likely a regression or change with containerd v2 or the kubelet.
I can reproduce on a bigger baremetal cluster as well. This is not limited to the qemu provisioner.
Steps
mkdir _out curl https://github.com/siderolabs/talos/releases/download/v1.8.0-beta.0/vmlinuz-amd64 -L -o _out/vmlinuz-amd64 curl https://github.com/siderolabs/talos/releases/download/v1.8.0-beta.0/initramfs-amd64.xz -L -o _out/initramfs-amd64.xz curl https://github.com/siderolabs/talos/releases/download/v1.8.0-beta.0/talosctl-linux-amd64 -L -o talosctl chmod +x talosctl sudo --preserve-env=HOME ./talosctl cluster create --provisioner qemu kubectl apply -f ./tun-test.yaml kubectl exec -ti -n kube-system tun-test -- sh
In the pod shell:
apk add -U python3 python3 -c 'open("/dev/net/tun")'
tun-test.yaml:
Logs
Environment
The text was updated successfully, but these errors were encountered: