89luca89 / 89luca89/distrobox

[Error] rootless distrobox cannot receive udev events from the host with podman

未关闭
#1,961 2 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
bug
主要语言
Go
星标
13k
派生
541
平均合并
20 小时 47 分钟
30 天内合并 PR
4

描述

See containers/toolbox#1203, also [this comment](https://github.com/containers/toolbox/issues/1203#issuecomment-3740950038).

The root cause is containers/podman#27898. I do not know the scope of this bug when the runtime is docker/lilipod/nerdctl.

TLDR: Due to a podman behavior that maps `kernel.overflowuid` into the rootless userns, libudev's userns detection logic fails to trigger, causing all hotplug detection mechanisms from within the distrobox to ignore host new device events. (for example, a wayland compositor launched from within distrobox will fail to detect any new input devices, existing devices at startup will be fine as long as they are not disconnected)

The biggest uncertainty here is that I do not know if this behavior is intended from the podman side or a bug, so we need to see how the podman maintainers respond.

For the scope of distrobox, the obvious workaround for this is to use the `--userns=keep-id:size=` flag to avoid mapping onto the overflowuid. For default setups where `kernel.overflowuid` is set to `65534`, adding this to distrobox creation would make everything work: `-a "--userns=keep-id:size=65534"` since this will override the default flag distrobox gives to podman. (Theoretically this might make images that fill the UID space unusable but I can't really say that is a practical concern)

I am not sure if we would want to make this workaround flag the default in distrobox, this still depends on whether podman want to change it or not. But if the distrobox maintainers do not think this is a bug that should be addressed in distrobox, feel free to convert this issue into a discussion to keep the workaround flag documented before any upstream fixes are landed.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。