netplan renders bond lacp-rate as a timevalue should be "fast" or "slow"

Bug #1745648 reported by Ryan Harper on 2018-01-26
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nplan (Ubuntu)
Critical
Mathieu Trudel-Lapierre

Bug Description

1 $ lsb_release -rd
Description: Ubuntu Bionic Beaver (development branch)
Release: 18.04

2. $ apt-cache policy nplan
nplan:
  Installed: 0.32
  Candidate: 0.32
  Version table:
 *** 0.32 500
        500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages
        100 /var/lib/dpkg/status

3. configuring a bond with lacp-rate: fast or slow
4. netplan fails to parse the lacp-rate as a string, expects it to be a time value

The systemd-networkd netdev documentation[A] indicates that LACPTransmitRate (which the netplan lacp-rate key maps to) has two values: "fast" and "slow" but netplan is rendering an integer.

A. https://www.freedesktop.org/software/systemd/man/systemd.netdev.html

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: nplan 0.32
ProcVersionSignature: User Name 4.13.0-31.34~16.04.1-generic 4.13.13
Uname: Linux 4.13.0-31-generic x86_64
ApportVersion: 2.20.8-0ubuntu3
Architecture: amd64
Date: Fri Jan 26 17:28:23 2018
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=C.UTF-8
 SHELL=/bin/bash
SourcePackage: nplan
UpgradeStatus: No upgrade log present (probably fresh install)

Ryan Harper (raharper) wrote :

If it's the case, then this would be a critical bug. However, it looks to me like LACP rate is being properly handled, values are 'slow' or 'fast', and an integration test exists to validate that.

Changed in nplan (Ubuntu):
status: New → Triaged
importance: Undecided → Critical
assignee: nobody → Mathieu Trudel-Lapierre (cyphermox)
status: Triaged → Incomplete

Ok, this is a bug in tests/generate.py, and a missing step to sanitize the string (check for the correct values of 'slow' or 'fast') in parse.c.

Changed in nplan (Ubuntu):
status: Incomplete → Triaged

You're right. It looks like the unittest passes because it switched to a
string which is passed through.
But the value of 10 in the tests/generate.py for lacp-rate isn't right and
looks like parse is not validating
the string value.

On Fri, Jan 26, 2018 at 11:42 AM, Mathieu Trudel-Lapierre <
<email address hidden>> wrote:

> If it's the case, then this would be a critical bug. However, it looks
> to me like LACP rate is being properly handled, values are 'slow' or
> 'fast', and an integration test exists to validate that.
>
> ** Changed in: nplan (Ubuntu)
> Status: New => Triaged
>
> ** Changed in: nplan (Ubuntu)
> Importance: Undecided => Critical
>
> ** Changed in: nplan (Ubuntu)
> Assignee: (unassigned) => Mathieu Trudel-Lapierre (cyphermox)
>
> ** Changed in: nplan (Ubuntu)
> Status: Triaged => Incomplete
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1745648
>
> Title:
> netplan renders bond lacp-rate as a timevalue should be "fast" or
> "slow"
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/nplan/+bug/
> 1745648/+subscriptions
>

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

Other bug subscribers