Comment 5 for bug 1224007

Revision history for this message
Dan Streetman (ddstreet) wrote :

I should note that this is marked as Fix Released in debian, but from the debian bug comments it just looks like Chris asked for that bug to be closed as a configuration issue (which this is not).

This is actually only a VLAN issue with higher-than-default mtu. The bond does not have anything to do with the problem. The problem is the vlan package (required for ifupdown vlan support) installs a udev rule that triggers for each new interface; it checks the ifupdown configuration, and creates any corresponding vlan interfaces. The real interface and all its vlan interfaces then race to finish udev processing and notify upstart, which then calls ifup directly on each interface. If upstart calls ifup for the vlan before the actual interface (and the vlan has a high mtu), it will fail while being brought up.

I think this can be fixed in a similar way to bug 1609367, where the problem is higher-than-default mtu on ipv6 (i.e. inet6 section); although in an easier way, since ifupdown already requires the 'vlan' package for vlan support, and that package provides an if-pre-up script already.

If we edit the /etc/network/if-pre-up.d/vlan script (from the vlan package) like below (for trusty, similar patch for x and y), it will increase the raw device's mtu if needed.

--- vlan.orig 2016-09-08 02:12:55.901172000 +0000
+++ vlan 2016-09-08 02:10:49.213172000 +0000
@@ -51,7 +51,14 @@
         echo "$IF_VLAN_RAW_DEVICE does not exist, unable to create $IFACE"
         exit 1
     fi
- ip link set up dev $IF_VLAN_RAW_DEVICE
+ if [ -n "$IF_MTU" ]; then
+ CUR_DEV_MTU=`cat /sys/class/net/$IF_VLAN_RAW_DEVICE/mtu`
+ # increase the vlan raw device mtu if needed
+ if [ -n "$CUR_DEV_MTU" ] && [ $CUR_DEV_MTU -lt $IF_MTU ]; then
+ MTU_PARAM="mtu $IF_MTU"
+ fi
+ fi
+ ip link set up dev $IF_VLAN_RAW_DEVICE $MTU_PARAM
     vconfig add $IF_VLAN_RAW_DEVICE $VLANID
 fi