ifup@%i.service systemd unit file can't be restarted for br0 device

Bug #2011484 reported by CH
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ifupdown (Ubuntu)
New
Undecided
Unassigned

Bug Description

On Ubuntu 20.04 and 22.04, we've configured a bridged device (br0) in /etc/network/interfaces like this:

auto br0
iface br0 inet static
        address 172.16.201.5
        netmask 255.255.255.0
        broadcast 172.16.201.255
        bridge_ports none

If we run `ifup br0` or `ifdown br0`, everything works perfectly.

If we run `systemctl restart ifup@br0`, br0 goes down but doesn't come back up. It prints this error:

    A dependency job for <email address hidden> failed. See 'journalctl -xe' for details.

The command `systemctl status ifup@br0` says (in part):

    Mar 13 15:09:10 example.com systemd[1]: <email address hidden>: Bound to unit sys-subsystem-net-devices-br0.device, but unit isn't active.
    Mar 13 15:09:10 example.com systemd[1]: Dependency failed for ifup for br0.
    Mar 13 15:09:10 example.com systemd[1]: <email address hidden>: Job <email address hidden>/start failed with result 'dependency'.

The lines in /lib/systemd/system/ifup@.service that seem to be causing the problem are:

    BindsTo=sys-subsystem-net-devices-%i.device
    After=sys-subsystem-net-devices-%i.device

Versions tested+affected:
    ifupdown/jammy,now 0.8.36+nmu1ubuntu3 amd64 [installed]
    ifupdown/focal,now 0.8.35ubuntu1 amd64 [installed]

Our workaround is to use `ifdown br0` and `ifup br0`, but it'd be nice if systemd could handle it.

Thanks

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.