bond intervals default to seconds; breaks existing configs

Bug #1765833 reported by Ryan Harper
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
netplan.io (Ubuntu)
Fix Released
Critical
Unassigned

Bug Description

1. # lsb_release -r -d
Description: Ubuntu Bionic Beaver (development branch)
Release: 18.04

2. # apt-cache policy netplan.io
netplan.io:
  Installed: 0.34.1
  Candidate: 0.34.1
  Version table:
 *** 0.34.1 500
        500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages
        100 /var/lib/dpkg/status

3. bonds with an mii-monitor-interval value of 100 should configure the bond device with an mii-interval of 100 milliseconds.

% cat /sys/class/net/bond0/bonding/miimon
100

4.

cat /sys/class/net/bond0/bonding/miimon
100000

This results in a 100+ second delay before a lacp bond device can transmit packets.

# journalctl -o short-precise | egrep "(bond0: Configured|bond0.*up)"
Apr 20 19:49:37.369840 rharper-b2 kernel: bond0: Enslaving enp3s0f1 as a backup interface with a down link
Apr 20 19:49:37.533851 rharper-b2 kernel: bond0: Enslaving enp3s0f0 as a backup interface with a down link
Apr 20 19:49:50.835954 rharper-b2 systemd-networkd[1101]: bond0: Configured
Apr 20 19:51:17.869837 rharper-b2 kernel: bond0: link status definitely up for interface enp3s0f1, 10000 Mbps full duplex
Apr 20 19:51:17.869944 rharper-b2 kernel: bond0: first active interface up!
Apr 20 19:51:17.869992 rharper-b2 kernel: bond0: link status definitely up for interface enp3s0f0, 10000 Mbps full duplex

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: netplan.io 0.34.1
ProcVersionSignature: Ubuntu 4.15.0-15.16-generic 4.15.15
Uname: Linux 4.15.0-15-generic x86_64
ApportVersion: 2.20.9-0ubuntu5
Architecture: amd64
Date: Fri Apr 20 19:56:50 2018
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=C.UTF-8
 SHELL=/bin/bash
SourcePackage: netplan.io
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Ryan Harper (raharper) wrote :
Revision history for this message
Ryan Harper (raharper) wrote :
Revision history for this message
Ryan Harper (raharper) wrote :

I've built netplan.io locally with this PR and it resolves the issue. We see
we're passing the 100 value through into networkd, and it gets the ms suffix.
Then in the journal, after the bond has been started, it is ready right away.

root@rharper-b2:~# apt-cache policy netplan.io
netplan.io:
  Installed: 0.35ubuntu2
  Candidate: 0.35ubuntu2
  Version table:
 *** 0.35ubuntu2 100
        100 /var/lib/dpkg/status
     0.35 500
        500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages
root@rharper-b2:~# cat /sys/class/net/bond0/bonding/miimon
100
root@rharper-b2:~#
root@rharper-b2:~# grep mii-monitor /etc/netplan/50-cloud-init.yaml
                mii-monitor-interval: 100
root@rharper-b2:~# grep MII /run/systemd/network/10-netplan-bond0.netdev
MIIMonitorSec=100ms

root@rharper-b2:~# journalctl -o short-precise | egrep "(bond0: Configured|Reboot|bond0.*up)"
Apr 20 19:49:37.369840 rharper-b2 kernel: bond0: Enslaving enp3s0f1 as a backup interface with a down link
Apr 20 19:49:37.533851 rharper-b2 kernel: bond0: Enslaving enp3s0f0 as a backup interface with a down link
Apr 20 19:49:50.835954 rharper-b2 systemd-networkd[1101]: bond0: Configured
Apr 20 19:51:17.869837 rharper-b2 kernel: bond0: link status definitely up for interface enp3s0f1, 10000 Mbps full duplex
Apr 20 19:51:17.869944 rharper-b2 kernel: bond0: first active interface up!
Apr 20 19:51:17.869992 rharper-b2 kernel: bond0: link status definitely up for interface enp3s0f0, 10000 Mbps full duplex
Apr 20 20:23:52.830809 rharper-b2 systemd[1]: Starting Reboot...
-- Reboot --
Apr 20 20:25:52.537598 rharper-b2 kernel: bond0: Enslaving enp3s0f1 as a backup interface with a down link
Apr 20 20:25:52.701599 rharper-b2 kernel: bond0: Enslaving enp3s0f0 as a backup interface with a down link
Apr 20 20:25:52.829601 rharper-b2 kernel: bond0: link status definitely up for interface enp3s0f1, 10000 Mbps full duplex
Apr 20 20:25:52.829628 rharper-b2 kernel: bond0: first active interface up!
Apr 20 20:25:53.037556 rharper-b2 kernel: bond0: link status definitely up for interface enp3s0f0, 10000 Mbps full duplex
Apr 20 20:26:06.511706 rharper-b2 systemd-networkd[1050]: bond0: Configured

Revision history for this message
Ryan Harper (raharper) wrote :
Changed in netplan.io (Ubuntu):
status: New → Fix Committed
David Britton (dpb)
Changed in netplan.io (Ubuntu):
importance: Undecided → Critical
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package netplan.io - 0.36.1

---------------
netplan.io (0.36.1) bionic; urgency=medium

  * tests/integration.py: Do a better cleanup for bridge-based tests; should
    fix instability with test_mix_bridge_on_bond.
  * tests/integration.py: Adjust autopkgtests to account for default behavior
    change for up/down delay, arp interval, mii interval introduced in the
    last upload.

 -- Mathieu Trudel-Lapierre <email address hidden> Mon, 23 Apr 2018 17:03:11 -0400

Changed in netplan.io (Ubuntu):
status: Fix Committed → Fix Released
tags: added: id-5acf94da4fdc30917ec9c571
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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