ifup does not execute if-up.d scripts for manual interfaces

Bug #1309788 reported by Theo Cabrerizo Diem on 2014-04-18
32
This bug affects 6 people
Affects Status Importance Assigned to Milestone
ifupdown (Ubuntu)
High
Unassigned

Bug Description

When having an interfaces stanza:

auto myvpn
iface myvpn inet manual
    openvpn myvpn

At least on ubuntu 13.10 (confirmed with ifupdown 0.7.44ubuntu3), doing a 'ifup -v myvpn' resulted in:
# ifup -v myvpn
Configuring interface myvpn=myvpn (inet)
run-parts --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/ethtool
run-parts --verbose /etc/network/if-up.d
run-parts: executing /etc/network/if-up.d/000resolvconf
run-parts: executing /etc/network/if-up.d/ethtool
run-parts: executing /etc/network/if-up.d/ntpdate
run-parts: executing /etc/network/if-up.d/openssh-server
run-parts: executing /etc/network/if-up.d/openvpn
 * Starting virtual private network daemon(s)...
 * Starting VPN 'myvpn'
run-parts: executing /etc/network/if-up.d/upstart
#

On ifupdown 0.7.47.2ubuntu4 (trusty):
# ifup -v myvpn
Configuring interface myvpn=myvpn (inet)
run-parts --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/ethtool
ip link set dev myvpn up
Cannot find device "myvpn"
Failed to bring up myvpn.
#

IMHO the mentioned line (ip link set ...) seems to be called before the if-up.d/* scripts. I cannot confirm if the origin of the issue is the same change mentioned in the bug #1305271, since I don't have the tools to rebuild the package without the mentioned line.

Information:
# lsb_release -rd
Description: Ubuntu 14.04 LTS
Release: 14.04
# apt-cache policy ifupdown
ifupdown:
  Installed: 0.7.47.2ubuntu4
  Candidate: 0.7.47.2ubuntu4
  Version table:
 *** 0.7.47.2ubuntu4 0
        500 http://de.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: ifupdown 0.7.47.2ubuntu4
ProcVersionSignature: Ubuntu 3.13.0-24.46-generic 3.13.9
Uname: Linux 3.13.0-24-generic x86_64
ApportVersion: 2.14.1-0ubuntu3
Architecture: amd64
Date: Sat Apr 19 00:49:42 2014
InstallationDate: Installed on 2014-04-18 (0 days ago)
InstallationMedia: Ubuntu-Server 14.04 LTS "Trusty Tahr" - Release amd64 (20140416.2)
ProcEnviron:
 LANGUAGE=en_US:en
 TERM=cygwin
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: ifupdown
UpgradeStatus: No upgrade log present (probably fresh install)

Theo Cabrerizo Diem (tcdiem) wrote :
Launchpad Janitor (janitor) wrote :

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

Changed in ifupdown (Ubuntu):
status: New → Confirmed
Wladimir Mutel (mwg) wrote :

I have a manual ipv6 6to4 interface and a script to configure it, to be run when a real-IPv4 interface is brought up.
And yes, with Ubuntu 14.04, 'ifup -vtun6to4' starts only if-pre-up.d scripts but not if-up.d
then it tries to set non-existing iface 'tun6to4' link up and fails.

algiz (algiz4221) wrote :

I also can confirm this with ifupdown 0.7.47.2ubuntu4.1 from trusty-updates. This vpnc configuration has been working for ages without any problems (before upgrading from saucy to trusty):

# /etc/network/interfaces
iface tun0 inet manual
    up vpnc-connect /etc/vpnc/some.conf
    down vpnc-disconnect
    up route del -host <some_IP> gw 0.0.0.0
    up route add -host <some_IP> gw 10.0.0.1 dev tun0

Doing "ifup tun0" now results in:
Cannot find device "tun0"
Failed to bring up tun0.

My current workaround is to change "up" to "pre-up" like this:

# /etc/network/interfaces
iface tun0 inet manual
    pre-up vpnc-connect /etc/vpnc/some.conf
    down vpnc-disconnect
    pre-up route del -host <some_IP> gw 0.0.0.0
    pre-up route add -host <some_IP> gw 10.0.0.1 dev tun0

ifdown seems not to be affected by this issues. "ifdown tun0" is performing vpnc-disconnect correctly.

Hamy (hamy-public1) wrote :

This bug is still reproducible in Ubuntu 15.10 Server. This effectively makes /usr/share/doc/openvpn/README.Debian.gz procedure invalid.

Hamy (hamy-public1) on 2016-04-22
tags: added: willy
tags: added: wily
removed: willy
Changed in ifupdown (Ubuntu):
importance: Undecided → High
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers