Skip to content

networkd inside of containers cannot do Driver= matches in .network files, since udev doesn't run in containers #15678

@seirl

Description

@seirl

systemd version the issue has been seen with

245

Used distribution

Archlinux

Expected behaviour you didn't see

When running a container with --network-veth, the host should have an interface ve- up and running, thanks to /usr/lib/systemd/network/80-container-ve.network. When using --network-zone, it should have a vb- interface up and running.

Networkctl should show: ve-... ether routable configured (and vz-... bridge routable configured when using a network zone)

Unexpected behaviour you saw

Networkctl shows: ve-... ether off unmanaged (and vb-... bridge off unmanaged when using a network zone).

The host does get an interface, but it is not matched by systemd-networkd and does not get an IP attributed. Removing Driver=veth from /usr/lib/systemd/network/80-container-ve.network fixes the issue (and Driver=bridge from /usr/lib/systemd/network/80-container-vb.network when using a network zone).

Steps to reproduce the problem

This happens for some reason in nested containers and in virtual machines. When the ve- interface is brought up, it doesn't have a Driver field (doesn't show any Driver field when running networkctl status ve-...). The Driver=veth / Driver=bridge condition isn't matched, and the interface doesn't get an IP attributed.

However, when doing ethtool -i ve-... I see the following entry: driver: veth (driver: bridge when using it on a vb-... interface), so there is a problem between ethtool and systemd-networkd.

Metadata

Metadata

Assignees

No one assigned

    Labels

    RFE 🎁Request for Enhancement, i.e. a feature requestnetworkudev

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions