Skip to content
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

Avoid calling udevadm in containers #1367

Open
jengelh opened this issue Apr 22, 2024 · 0 comments
Open

Avoid calling udevadm in containers #1367

jengelh opened this issue Apr 22, 2024 · 0 comments

Comments

@jengelh
Copy link

jengelh commented Apr 22, 2024

Version: 5.0.3 (Tumbleweed 20240328 amd64)

Run yast-network in a LXC/nspawn container, set a new static hostname. When yast-network tries to save the configuration, it does that, but also runs into an error:

                               │ Execution of command "[["/usr/bin/udevadm", "control",       │                                
                               │ "--reload"]]" failed. Exit code: 1 Error output: Failed to   │                                
                               │ send reload request: No such file or directory               │                                

and

   -   Activate network service│ Error                                                        │                                
   -   Update configuration    │ Execution of command "[["/usr/bin/udevadm", "trigger",       │                                
                               │ "--subsystem-match=net", "--action=add"]]" failed. Exit      │                                
                               │ code: 1 Error output: host0: Failed to write 'add' to        │                                
                               │ '/sys/devices/virtual/net/host0/uevent': Read-only file      │                                
                               │ system                                                       │                                

This is because udev cannot be reloaded in a container.

# strace -f udevadm control --reload 2>&1|grep ENOE
connect(3, {sa_family=AF_UNIX, sun_path="/run/udev/control"}, 20) = -1 ENOENT (No such file or directory)

Expected:

Use systemd-detect-virt or similar to see if reloading even makes sense. Or perhaps there is a service that could be reloaded; if said service has ConditionVirt=, then something in the style of systemctl reload udevadm would ignore-succeed the request. (There is no udevadm.service though..)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant