[Bug 1295304] Re: ifdown -a fails with vlans on bonded interface

Stéphane Graber stgraber at stgraber.org
Sun Mar 23 20:22:51 UTC 2014


Hi Andrew, my understanding from back when you introduced that support
into ifupdown was that you intended for people to use ifupdown directly
for bridge and vlan management rather than through the hooks provided by
bridge-utils and vlan.

Since Ubuntu is doing a bit of weird magic here (compared to how things
are in Debian) and the actual bridge and vlan creation is sometimes
triggered from udev entirely independently of ifupdown, it seemed to me
like there wouldn't be a real way of changing ifupdown to cope with this
and that rather than having two piece of software try to do the same
thing, turning the whole vlan and bridge support of in ifupdown seemed
the right way forward.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to ifupdown in Ubuntu.
https://bugs.launchpad.net/bugs/1295304

Title:
  ifdown -a fails with vlans on bonded interface

Status in “ifupdown” package in Ubuntu:
  Fix Released
Status in “ifupdown” package in Debian:
  New

Bug description:
  This has been observed in trusty:
  ii  ifupdown                         0.7.47.2ubuntu1               amd64        high level tools to configure network interfaces

  VLAN interfaces are unable to be brought down properly with ifdown -a:

  $ sudo ifdown -av
  run-parts --verbose /etc/network/if-down.d
  run-parts: executing /etc/network/if-down.d/resolvconf
  run-parts: executing /etc/network/if-down.d/upstart
  Configuring interface bond0.205=bond0.205 (inet)
  run-parts --verbose /etc/network/if-down.d
  run-parts: executing /etc/network/if-down.d/resolvconf
  run-parts: executing /etc/network/if-down.d/upstart

  ip -4 addr flush dev bond0.205 label bond0.205
  run-parts --verbose /etc/network/if-post-down.d
  run-parts: executing /etc/network/if-post-down.d/bridge
  run-parts: executing /etc/network/if-post-down.d/ifenslave
  + BOND_PARAMS=/sys/class/net/bond0.205/bonding
  + IFSTATE=/run/network/ifstate
  + [ -f /sys/class/net/bond0.205/master/bonding/slaves ]
  + [ ! -f /sys/class/net/bond0.205/bonding/slaves ]
  + exit
  run-parts: executing /etc/network/if-post-down.d/vlan
  Removed VLAN -:bond0.205:-
  ip link del bond0.205
  Cannot find device "bond0.205"
  run-parts --verbose /etc/network/if-post-down.d
  run-parts: executing /etc/network/if-post-down.d/bridge
  run-parts: executing /etc/network/if-post-down.d/ifenslave
  + BOND_PARAMS=/sys/class/net/--all/bonding
  + IFSTATE=/run/network/ifstate
  + [ -f /sys/class/net/--all/master/bonding/slaves ]
  + [ ! -f /sys/class/net/--all/bonding/slaves ]
  + exit
  run-parts: executing /etc/network/if-post-down.d/vlan

  $ ifconfig
  bond0     Link encap:Ethernet  HWaddr 52:54:00:ae:24:cf
            inet addr:192.168.122.207  Bcast:192.168.122.255  Mask:255.255.255.0
            UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1
            RX packets:114 errors:0 dropped:53 overruns:0 frame:0
            TX packets:61 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:0
            RX bytes:7630 (7.6 KB)  TX bytes:5102 (5.1 KB)

  bond0.201 Link encap:Ethernet  HWaddr 52:54:00:ae:24:cf
            inet addr:192.168.201.10  Bcast:192.168.201.255  Mask:255.255.255.0
            UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
            RX packets:0 errors:0 dropped:0 overruns:0 frame:0
            TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:0
            RX bytes:0 (0.0 B)  TX bytes:42 (42.0 B)

  eth0      Link encap:Ethernet  HWaddr 52:54:00:ae:24:cf
            UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
            RX packets:56 errors:0 dropped:53 overruns:0 frame:0
            TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:1000
            RX bytes:3170 (3.1 KB)  TX bytes:0 (0.0 B)

  eth1      Link encap:Ethernet  HWaddr 52:54:00:ae:24:cf
            UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
            RX packets:58 errors:0 dropped:0 overruns:0 frame:0
            TX packets:61 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:1000
            RX bytes:4460 (4.4 KB)  TX bytes:5102 (5.1 KB)

  lo        Link encap:Local Loopback
            inet addr:127.0.0.1  Mask:255.0.0.0
            UP LOOPBACK RUNNING  MTU:65536  Metric:1
            RX packets:16 errors:0 dropped:0 overruns:0 frame:0
            TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:0
            RX bytes:1184 (1.1 KB)  TX bytes:1184 (1.1 KB)

  We'd expect that all interfaces come down with 'ifdown -a', but we get
  this error.

  [Test Case]

  Create a Trusty VM with two network interfaces, or have hardware with
  two network interfaces.

  Change /etc/network/interfaces to the following:
  auto lo
  iface lo inet loopback

  auto eth0
  iface eth0 inet manual
          bond-master bond0

  auto eth1
  iface eth1 inet manual
          bond-master bond0

  auto bond0
  iface bond0 inet dhcp
          bond-slaves none
          bond-primary eth0
          bond-mode 1
          bond-miimon 100
          bond-updelay 200
          bond-downdelay 200

  auto bond0.201
  iface bond0.201 inet static
          address 192.168.201.10
          netmask 255.255.255.0

  auto bond0.205
  iface bond0.205 inet static
          address 192.168.205.10
          netmask 255.255.255.0

  --

  ProblemType: Bug
  DistroRelease: Ubuntu 14.04
  Package: ifupdown 0.7.47.2ubuntu1
  ProcVersionSignature: User Name 3.13.0-17.37-generic 3.13.6
  Uname: Linux 3.13.0-17-generic x86_64
  ApportVersion: 2.13.3-0ubuntu1
  Architecture: amd64
  Date: Thu Mar 20 18:16:49 2014
  ProcEnviron:
   TERM=vt102
   PATH=(custom, no user)
   XDG_RUNTIME_DIR=<set>
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: ifupdown
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ifupdown/+bug/1295304/+subscriptions



More information about the foundations-bugs mailing list