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

Bug #1745648 reported by Ryan Harper
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Netplan
Fix Released
Undecided
Unassigned
netplan.io (Ubuntu)
Fix Released
High
Unassigned
nplan (Ubuntu)
Invalid
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)

Revision history for this message
Ryan Harper (raharper) wrote :
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) 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
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

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
Revision history for this message
Ryan Harper (raharper) wrote : Re: [Bug 1745648] Re: netplan renders bond lacp-rate as a timevalue should be "fast" or "slow"

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
>

Revision history for this message
Lukas Märdian (slyon) wrote :

The input validation for "lacp-rate" is still missing and should be checked for "slow" or "fast" in src/parse.c.

Re-assigning to the netplan.io project as "nplan" is deprecated.

Changed in netplan.io (Ubuntu):
status: New → Triaged
importance: Undecided → High
Changed in nplan (Ubuntu):
status: Triaged → Invalid
tags: added: rls-jj-incoming
tags: added: rls-kk-incoming
removed: rls-jj-incoming
Lukas Märdian (slyon)
tags: added: fr-2349
tags: removed: rls-kk-incoming
Revision history for this message
Lukas Märdian (slyon) wrote :
Changed in netplan:
status: New → In Progress
Lukas Märdian (slyon)
Changed in netplan:
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package netplan.io - 0.106.1-2

---------------
netplan.io (0.106.1-2) unstable; urgency=medium

  * Increase test timeouts to fix FTBFS on mips64el and riscv64
    d/p/0012-meson-Increase-test-timeout-for-slow-architectures.patch

 -- Lukas Märdian <email address hidden> Wed, 21 Jun 2023 09:20:56 +0200

Changed in netplan.io (Ubuntu):
status: Triaged → Fix Released
Lukas Märdian (slyon)
Changed in netplan:
status: Fix Committed → Fix Released
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.