vlan on top of bond interfaces assumes bond[0-9]+ naming

Bug #1695929 reported by JuanJo Ciarlante
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
vlan (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Context: deploying nodes via maas with bonds and vlans
on top of them, in particular for the example below:
bong-stg and bond-stg.600

~# dpkg-query -W vlan
vlan 1.9-3.2ubuntu1.16.04.1

* /etc/network/interfaces excerpt as setup by Maas
  (obfuscated for ip and mac addresses)

[...]
auto bond-stg
iface bond-stg inet static
    address x.x.x.x/x
    bond-xmit_hash_policy layer2
    bond-slaves none
    hwaddress ether xx:xx:xx:xx:xx:xx
    bond-miimon 100
    bond-lacp_rate slow
    mtu 9000
    bond-mode 802.3ad

[...]
auto bond-stg.600
iface bond-stg.600 inet static
    address x.x.x.x/x
    vlan_id 600
    vlan-raw-device bond-stg
    mtu 9000

* FYI bong-stg is properly brought up

* upping bong-stg.600 fails with:

~# ifup bond-stg.600
/etc/network/if-pre-up.d/mtuipv6: line 9: /sys/class/net/bond-stg.600/mtu: No such file or directory
/etc/network/if-pre-up.d/mtuipv6: line 10: /proc/sys/net/ipv6/conf/bond-stg.600/mtu: No such file or directory
Set name-type for VLAN subsystem. Should be visible in /proc/net/vlan/config
iface bond-mgmt inet manual
cat: /sys/class/net/bond-stg.600/mtu: No such file or directory
Device "bond-stg.600" does not exist.
bond-stg.600 does not exist, unable to create bond-stg.600
run-parts: /etc/network/if-pre-up.d/vlan exited with return code 1
Failed to bring up bond-stg.600.

- this happens because /etc/network/if-pre-up.d/vlan
  hardcodes bond names to be bond[0-9][0-9]*

* changing above regexp to bond[^.]* fixes it
 (modulo the mtu error):

~# ifup bond-stg.600
/etc/network/if-pre-up.d/mtuipv6: line 9: /sys/class/net/bond-stg.600/mtu: No such file or directory
/etc/network/if-pre-up.d/mtuipv6: line 10: /proc/sys/net/ipv6/conf/bond-stg.600/mtu: No such file or directory
Set name-type for VLAN subsystem. Should be visible in /proc/net/vlan/config
Added VLAN with VID == 600 to IF -:bond-stg:-

* diff for above changes to /etc/network/if-pre-up.d/vlan
- http://paste.ubuntu.com/24784957/

Joshua Powers (powersj)
Changed in vlan (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.