[systemd-devel] Device units and LXC

Lennart Poettering lennart at poettering.net
Sat May 24 19:46:04 PDT 2014


On Sat, 24.05.14 15:19, Richard Weinberger (richard at nod.at) wrote:

> Hi!
> 
> As of my understanding of systemd, device units depend hard udev.
> Units like network at .service contain lines like "BindsTo=sys-subsystem-net-devices-%i.device"
> Within a Linux container this is a problem because there is no udev.
> There systemd never receives an event for this device and the device unit never shows up.
> 
> I'm wondering what we can do to improve the situation.
> At least for Ethernet devices systemd could just use sysfs to find out
> whether the device is present or not.

We were considering doing something like that, but ultimately the
network managing software anyway needs to know that it runs in a
container and not rely on udev properties and suchlike if so. But if it
needs that then thee's no point in faking device availabality in the
containers.

systemd-networkd gets this right, please talk to the authors of your
network managing software to follow the same scheme (or, alternatively,
just use systemd-networkd...)

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list