ifupdown.upstart.if-up script will never fire static-network-up with auto virtual interfaces defined
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ifupdown (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
The upstart script compares the list of "auto" interfaces from ifquery to the ifup.xx files created in /run/network and will only fire the static-network-up event when all listed auto interfaces are shown as up. The problem arises if virtual interfaces (eth0:1 eth0:2) are used to add additional addresses to a single physical interface. Virtual interfaces are brought up by adding the address to the existing base interface, and no corresponding file is created in /run/network for the virtual interface (I believe this also holds true for VLAN interfaces i.e. eth0.1) . If the virtual device is brought up at boot with an "auto" clause in /etc/network/
The result is that if any virtual interfaces are defined as auto, then network boot will stall and system boot will not complete until failsafe fires after 120 seconds.
My temporary solution to this is to patch the script to remove the virtual part of the interface name before checking if it has been brought up:
all_interfaces_up() {
# return true if all interfaces listed in /etc/network/
# are up. if no interfaces are found there, then "all [given] were up"
local prefix="$1" iface=""
for iface in $(get_auto_
> iface=${iface##:*}
> iface=${iface##.*}
# if cur interface does is not up, then all have not been brought up
[ -f "${prefix}${iface}" ] || return 1
done
return 0
}
This is an imperfect fix since it is then possible for the static-network-up event to fire before all virtual interfaces are indeed up - but if combined with ensuring that the interfaces with additional virtual/vlan definitions are the first interfaces defined in /etc/network/
A more perfect fix would require a much deeper dive, as a different list of "up" interfaces must be found or created...
I have not checked the history of this script but it has not changed from my installed version of ifupdown (0.7.47.2ubuntu4.1)
to the latest 0.7.54 debian source...
ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: ifupdown 0.7.47.2ubuntu4.1
ProcVersionSign
Uname: Linux 3.16.0-46-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.11
Architecture: amd64
Date: Fri Aug 28 10:46:39 2015
InstallationDate: Installed on 2015-06-23 (65 days ago)
InstallationMedia: Ubuntu-Server 14.04.2 LTS "Trusty Tahr" - Release amd64 (20150218.1)
ProcEnviron:
LANGUAGE=en_CA:en
TERM=xterm
PATH=(custom, no user)
LANG=en_CA.UTF-8
SHELL=/bin/bash
SourcePackage: ifupdown
UpgradeStatus: No upgrade log present (probably fresh install)
mtime.conffile.
Status changed to 'Confirmed' because the bug affects multiple users.