ifup@.service doesn't work with interface names containing a dash

Bug #1655059 reported by Frederik Slos
14
This bug affects 3 people
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/system/ifup@.service; static; vendor preset: enabled)
   Active: active (exited) since Mon 2017-01-09 15:55:15 CET; 10min ago
  Process: 4705 ExecStop=/sbin/ifdown %I (code=exited, status=1/FAILURE)
  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/interfaces.d/60_iface_br-vxlan

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://xxxxxxx.cisco.com/ubuntu xenial-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     0.8.10ubuntu1 500
        500 http://xxxxxxx.cisco.com/ubuntu xenial/main amd64 Packages

Revision history for this message
Frederik Slos (slosf) wrote :

I looked into a fix for this:
The problem is in
/lib/systemd/system/ifup@.service

looking at 'Table 9.14. Important Unit Specifiers' on
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/sect-Managing_Services_with_systemd-Unit_Files.html

the change to be made is changing all instances of %I to %i

That fixes it for us anyway.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ifupdown (Ubuntu):
status: New → Confirmed
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Either that, or when calling these units systemd-escape should be run over the names.

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.