bridge-utils incompatible with ifupdown on bionic

Bug #1756846 reported by Alejandro Mery on 2018-03-19
36
This bug affects 4 people
Affects Status Importance Assigned to Milestone
ifupdown (Ubuntu)
Critical
Steve Langasek

Bug Description

$ apt-cache policy ifupdown bridge-utils
ifupdown:
  Installed: (none)
  Candidate: 0.8.16ubuntu2
  Version table:
     0.8.16ubuntu2 500
        500 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
        100 /var/lib/dpkg/status
bridge-utils:
  Installed: 1.5-15ubuntu1
  Candidate: 1.5-15ubuntu1
  Version table:
 *** 1.5-15ubuntu1 500
        500 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
        100 /var/lib/dpkg/status

$ sudo apt-get install ifupdown
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  rdnssd
The following packages will be REMOVED
  bridge-utils
The following NEW packages will be installed
  ifupdown
0 to upgrade, 1 to newly install, 1 to remove and 0 not to upgrade.
Need to get 55.2 kB of archives.
After this operation, 119 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 ifupdown amd64 0.8.16ubuntu2 [55.2 kB]
Fetched 55.2 kB in 0s (1,280 kB/s)
(Reading database ... 251311 files and directories currently installed.)
Removing bridge-utils (1.5-15ubuntu1) ...
Selecting previously unselected package ifupdown.
(Reading database ... 251286 files and directories currently installed.)
Preparing to unpack .../ifupdown_0.8.16ubuntu2_amd64.deb ...
Unpacking ifupdown (0.8.16ubuntu2) ...
Setting up ifupdown (0.8.16ubuntu2) ...
Processing triggers for ureadahead (0.100.0-20) ...
ureadahead will be reprofiled on next reboot
Processing triggers for systemd (237-3ubuntu4) ...
Processing triggers for man-db (2.8.2-1) ...

$ sudo apt-get install bridge-utils
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  ifupdown
The following packages will be REMOVED
  ifupdown
The following NEW packages will be installed
  bridge-utils
0 to upgrade, 1 to newly install, 1 to remove and 0 not to upgrade.
Need to get 0 B/30.1 kB of archives.
After this operation, 119 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 251318 files and directories currently installed.)
Removing ifupdown (0.8.16ubuntu2) ...
Selecting previously unselected package bridge-utils.
(Reading database ... 251286 files and directories currently installed.)
Preparing to unpack .../bridge-utils_1.5-15ubuntu1_amd64.deb ...
Unpacking bridge-utils (1.5-15ubuntu1) ...
Setting up bridge-utils (1.5-15ubuntu1) ...
Processing triggers for man-db (2.8.2-1) ...

Related branches

Launchpad Janitor (janitor) wrote :

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

Changed in bridge-utils (Ubuntu):
status: New → Confirmed
Albert Damen (albrt) wrote :

apt-cache show bridge-utils | grep -E "Pack|Vers|Confl"
Package: bridge-utils
Version: 1.5-15ubuntu1
Conflicts: ifupdown (<< 0.8.17)

So that conflict applies to ifupdown 0.8.16ubuntu2 in Bionic

Alejandro Mery (amery) wrote :

thanks @albrt, I didn't know that one

Andreas Hasenack (ahasenack) wrote :

That conflicts was updated in this Debian change:

diff --git a/debian/changelog b/debian/changelog
index 845b518..ecc3f29 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+bridge-utils (1.5-12) unstable; urgency=medium
+
+ * Add vlan support so that old setups using vlans as ports don't break.
+
+ -- Santiago Garcia Mantinan <email address hidden> Sun, 22 Jan 2017 00:23:50 +0100
+
 bridge-utils (1.5-11) unstable; urgency=low

   * Change /etc/default/bridge-utils to enable addition of hotplugged
diff --git a/debian/control b/debian/control
index c9b33ed..2b21fee 100644
--- a/debian/control
+++ b/debian/control
@@ -10,7 +10,7 @@ Architecture: linux-any
 Multi-Arch: foreign
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Suggests: ifupdown
-Conflicts: ifupdown (<< 0.6.0)
+Conflicts: ifupdown (<< 0.8.17)
 Description: Utilities for configuring the Linux Ethernet bridge
  This package contains utilities for configuring the Linux Ethernet
  bridge in Linux. The Linux Ethernet bridge can be used for connecting
diff --git a/debian/ifupdown.sh b/debian/ifupdown.sh
index 95dac90..517f084 100644
--- a/debian/ifupdown.sh
+++ b/debian/ifupdown.sh
@@ -66,6 +66,7 @@ do
   do
     # We attach and configure each port of the bridge
     if [ "$MODE" = "start" ] && [ ! -d /sys/class/net/$IFACE/brif/$port ]; then
+ create_vlan_port
       if [ "$IF_BRIDGE_HW" ]
       then
         KVER="$(uname -r)"
@@ -84,7 +85,7 @@ do
       brctl addif $IFACE $port && ip link set dev $port up
     # We detach each port of the bridge
     elif [ "$MODE" = "stop" ] && [ -d /sys/class/net/$IFACE/brif/$port ]; then
- ip link set dev $port down && brctl delif $IFACE $port && \
+ ip link set dev $port down && brctl delif $IFACE $port && destroy_vlan_port
       if [ -f /proc/sys/net/ipv6/conf/$port/disable_ipv6 ]
       then
         echo 0 > /proc/sys/net/ipv6/conf/$port/disable_ipv6

Yes andreas, this is the issue I mentioned on IRC.
AFAIK I think foundations is on that.

I'm subscribing the few that I've seen mentioning it for awareness.
So that they can dup it if they have another bug for that already.

Steve Langasek (vorlon) on 2018-03-21
affects: bridge-utils (Ubuntu) → ifupdown (Ubuntu)
Changed in ifupdown (Ubuntu):
assignee: nobody → Steve Langasek (vorlon)
importance: Undecided → Critical
status: Confirmed → In Progress
Steve Langasek (vorlon) on 2018-03-21
Changed in ifupdown (Ubuntu):
status: In Progress → Fix Committed
Download full text (3.8 KiB)

I was looking at the test fail in proposed migration.

I realized it fails on ppc64 since 14th August 2017 (and since then it always fails, confirmed by a retry and [1] - even in Artful it fails since then).

It unfortunately fails without any message.

I found in hints-ubuntu/vorlon
# regressed in release; maybe related to resolved/netplan.
force-badtest ifupdown/0.8.16ubuntu2/ppc64el

I tried to recreate that in a VM on ppc.
1. installing ifupdown gives a valid /e/n/i to run the test
2. Test exec reproduces the issue we see in CI
   Verbose log
+ IFACE=sdtest42
+ [ -e /sys/class/net/sdtest42 ]
+ grep -q source-directory .*interfaces.d /etc/network/interfaces
+ grep -q source .*interfaces.d.*cfg /etc/network/interfaces
+ IFACE_CFG=/etc/network/interfaces.d/sdtest42.cfg
+ cat
+ ip link add name sdtest42 type veth peer name vsdtest42
+ trap ip link del dev sdtest42; rm /etc/network/interfaces.d/sdtest42.cfg EXIT INT QUIT PIPE
+ sleep 3
+ ifquery --state sdtest42
+ ip link del dev sdtest42
+ rm /etc/network/interfaces.d/sdtest42.cfg

That means the ifquery fails, and the set -e triggers the trap
=> No message, buu RC=1

Comparing x86/ppc on this in detail
1. VM fresh from cloud image (20180321)
   => no /etc/network/interfaces

2. installed (current) ifupdown
   $ cat /etc/network/interfaces
   # interfaces(5) file used by ifup(8) and ifdown(8)
   # Include files from /etc/network/interfaces.d:
   source-directory /etc/network/interfaces.d

3. purged ifupdown
   leaves e/n/i

4. reinstall from proposed
   still the same e/n/i
=> Until here all is fine, and if installing ifupdown (on a fresh system) drops /e/n/i that explains why no test goes to the SKIP condition.

5. Set up prep steps as the test does
IFACE_CFG=/etc/network/interfaces.d/sdtest42.cfg
IFACE=sdtest42
cat <<EOF > $IFACE_CFG
allow-hotplug $IFACE
iface $IFACE inet static
    address 192.168.234.129
    netmask 255.255.255.0
EOF
=> check status (before adding dev via IP)
$ systemctl status -l <email address hidden>; ifquery -l --allow=hotplug; ifquery sdtest42;
● <email address hidden> - ifup for sdtest42
   Loaded: loaded (/lib/systemd/system/ifup@.service; static; vendor preset: enabled)
   Active: inactive (dead)
Unknown interface sdtest42
# The same on x86 and ppc64

6. add dev (comment says: these should trigger uevents and ifup@.service)
$ ip link add name $IFACE type veth peer name v$IFACE
Check status again shows it is still as dead as before.
# systemctl status -l <email address hidden>; ifquery -l --allow=hotplug; ifquery sdtest42;
● <email address hidden> - ifup for sdtest42
   Loaded: loaded (/lib/systemd/system/ifup@.service; static; vendor preset: enabled)
   Active: inactive (dead)
Unknown interface sdtest42

The device itself is there after the add
$ ll /sys/class/net/sdtest42
lrwxrwxrwx 1 root root 0 Mär 22 07:20 /sys/class/net/sdtest42 -> ../../devices/virtual/net/sdtest42/

ifquery does not find the device config (here as it should look like on xenial):
$ ifquery sdtest42
address: 192.168.234.129
netmask: 255.255.255.0
broadcast: 192.168.234.255

7. I tried to fix via enabling old style networking
$ systemctl disable systemd-networkd.socket
$ ...

Read more...

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ifupdown - 0.8.17ubuntu1

---------------
ifupdown (0.8.17ubuntu1) bionic; urgency=medium

  * Merge from Debian unstable.
    - Resolve conflicts with newer bridge-utils. LP: #1756846.
  * Remaining changes:
    - Always call dhclient with -1, Ubuntu carries a patch so that renewal
      won't time out.
    - ifup@.service, ifupdown-hotplug: Additionally run for "auto" class. We
      don't really support "allow-hotplug" in Ubuntu at the moment, so we need
      to deal with "auto" devices appearing after the "networking" init script
      already ran. (LP: #1374521)
    - Drop obsolete upstart integration.
  * Dropped changes, included in Debian:
    - networking.service: exclude loopback device lo in ExecStop.
    - Export $CLASS to scripts.
    - Add a few missing voids for functions that do not take any parameters.
    - Add a bug-script to automatically add /etc/network/interfaces etc. to
      reportbug output.
    - debian/ifup@.service: Start after device is up
  * Dropped changes, superseded in Debian:
    - disabled upping of bridges: this is now handled exclusively through
      ifupdown, bridge-utils hook no longer handles this at all.

ifupdown (0.8.17) unstable; urgency=medium

  [ Scott Moser ]
  * Don't bring down the loopback interface when networking.service stops.
    Closes: #841106, #841107

  [ Guus Sliepen ]
  * Export $CLASS to scripts.
  * Add a bug-script.
  * Depend on freebsd-net-tools instead of net-tools.
  * Also configure VLANs on bridge interfaces (see #818849).
  * Improve manpage: simplify example, add more section headers.
    Closes: #840579
  * Provide IPv6 examples in /u/s/d/ifupdown/examples/network-interfaces.
    Closes: #703568
  * Use -4 option for IPv4 dhclient. Closes: #844592

  [ Martin Pitt ]
  * ifup@.service: start After the corresponding
    sys-subsystem-net-devices device.

 -- Steve Langasek <email address hidden> Wed, 21 Mar 2018 14:53:25 -0700

Changed in ifupdown (Ubuntu):
status: Fix Committed → Fix Released
Alejandro Mery (amery) wrote :

I had to install ifupdown manually, and got 0.8.17ubuntu1. everything fine now, but shouldn't this package be pulled in automatically somehow?

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers