What a mess this is.

First, in trusty/xenial, my patch (as discussed above in comment 7)
works correctly and I have a ppa at
https://launchpad.net/~ddstreet/+archive/ubuntu/lp1804018

However, I need to first fix disco and sru back from there.
Unfortunately, in later releases, things get quite unpleasant.

Unfortunately, it seems like ALL three of the packages that used to
coordinate now think they own vlan creation.  In the past (i.e.
trusty/xenial), the vlan package was solely responsible for the creation
of any vlan link, from the if-pre-up.d/vlan script (which was called
either during ifup of the vlan interface, or from udev when the vlan's
raw-device was detected).

Now, in bionic and later:

ifupdown thinks it owns vlan link creation, in the link.defn file.  It
used to special-case interfaces with bridge_ports defined, but that was
explicitly removed, and now ifupdown will create a vlan link for ALL
interfaces that end with .NNN, even if they contain a bridge_ports
parameter (note that 'special case' has been removed from the man page
in bionic and later,
http://manpages.ubuntu.com/manpages/bionic/man5/interfaces.5.html).

bridge-utils ALSO thinks it owns vlan link creation, in the
create_vlan_port() function from /lib/bridge-utils/bridge_utils.sh,
which is called from /lib/udev/bridge-network-interface and from /lib
/bridge-utils/ifupdown.sh

Finally, vlan still thinks (quite correctly, IMHO) that it owns vlan
link creation.

Unfortunately, all this mess results in it being quite difficult to have
these 'special case' ifupdown interface names, with a .NNN vlan suffix
but also 'bridge_ports' parameter that supposedly indicates it's a
bridge, not a vlan.

I'm tempted to simply fix xenial/trusty and not touch bionic or later,
but that will result in a regression for anyone upgrading from xenial to
bionic (since the upgrade will keep ifupdown).  However, if the ifupdown
"api" really has changed - meaning in t/x you *can* have bridge
interface names ending in .NNN, while in bionic and later you *cannot* -
then "fixing" only t/x is the correct thing to do, and simply let people
upgrade from x->b and hit the behavior change and then debug and have to
fix their ifupdown config.

Also I should note that in bionic and later, during normal boot, this
"vlan-named-bridge" interface actually *does* work correctly, and
creates it as a bridge, not vlan.  However, ifupdown remains confused
about it and thinks the vlan-named-bridge never was brought fully up.
So you can't ifdown it.  Also, manually trying to ifup the interface
fails, so it's only a timing coincidence that it "works" during boot.

I'll take some time to think about this.  Since juju has already been
patched to fix this (by changing the bridge name to replace '.' with
'-'), this should be less urgent.

** Changed in: vlan (Ubuntu Trusty)
   Importance: Medium => Low

** Changed in: vlan (Ubuntu Xenial)
   Importance: Medium => Low

** Changed in: vlan (Ubuntu Bionic)
   Importance: Medium => Low

** Changed in: vlan (Ubuntu Cosmic)
   Importance: Medium => Low

** Changed in: vlan (Ubuntu Disco)
   Importance: Medium => Low

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

Title:
  Autogenerated interface name prevents creating a bridge over a VLAN

To manage notifications about this bug go to:
https://bugs.launchpad.net/juju/+bug/1804018/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to