Skip to content

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

@chaserhkj

Description

@chaserhkj

See containers/toolbox#1203, also this comment.

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions