ifup@.service doesn't work with interface names containing a dash
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ifupdown (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
It seems dashes get replaced by forward slash in the unit file and hence the interface is not found.
Endresult is that the interface does not come up.
$ sudo systemctl start ifup@br-vxlan
$ # I'm expecting this brings up the br-vxlan, but nothing happens, this command doesn't return an error message
Further info:
$ sudo systemctl status ifup@br-vxlan
* <email address hidden> - ifup for br/vxlan
Loaded: loaded (/lib/systemd/
Active: active (exited) since Mon 2017-01-09 15:55:15 CET; 10min ago
Process: 4705 ExecStop=
Process: 4713 ExecStart=/bin/sh -ec ifup --allow=hotplug %I; ifup --allow=auto %I; if ifquery %I >/dev/
Main PID: 4713 (code=exited, status=0/SUCCESS)
CGroup: /<email address hidden>
Jan 09 15:55:15 xxxxxxxxxxx systemd[1]: Started ifup for br/vxlan.
Jan 09 15:55:15 xxxxxxxxxxx sh[4713]: Unknown interface br/vxlan
$ cat /etc/network/
allow-auto br-vxlan
allow-boot br-vxlan
allow-hotplug br-vxlan
iface br-vxlan inet manual
bridge_fd 0
bridge_maxwait 0
bridge_ports enp1s0f1
bridge_stp off
bridge_waitport 0
$ lsb_release -rd
Description: Ubuntu 16.04.1 LTS
Release: 16.04
$ apt-cache policy ifupdown
ifupdown:
Installed: 0.8.10ubuntu1.2
Candidate: 0.8.10ubuntu1.2
Version table:
*** 0.8.10ubuntu1.2 500
500 http://
100 /var/lib/
0.8.10ubuntu1 500
500 http://
I looked into a fix for this: system/ ifup@.service
The problem is in
/lib/systemd/
looking at 'Table 9.14. Important Unit Specifiers' on /access. redhat. com/documentati on/en-US/ Red_Hat_ Enterprise_ Linux/7/ html/System_ Administrators_ Guide/sect- Managing_ Services_ with_systemd- Unit_Files. html
https:/
the change to be made is changing all instances of %I to %i
That fixes it for us anyway.