netplan fails to parse 'mtu' key

Bug #1668693 reported by Ryan Harper on 2017-02-28
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nplan (Ubuntu)
Mathieu Trudel-Lapierre

Bug Description

Users of netplan may wish to specify a custom MTU value for a device.

[Test case]
- Run nplan integration tests on the release
- Validate that netplan generate && netplan apply alone, without config, behave as expected (no result)
- Validate that netplan generate && netplan apply with minimal config writes /run/NetworkManager/conf.d/10-globally-managed-devices.conf
- Validate that netplan generate && netplan apply works with any existing configuation.
- Use the following config; ensure behavior is as expected (MTU value is set on the interface; adjust device name as appropriate):

  version: 2
      dhcp4: true
      mtu: 1280

[Regression potential]
Any failure to work with existing configuration should be considered a regression. Any new failure of the test suite would be a regression.


1. root@z1:/etc/netplan# lsb_release -rd
Description: Ubuntu Zesty Zapus (development branch)
Release: 17.04

2. root@z1:/etc/netplan# apt-cache policy nplan
  Installed: 0.18
  Candidate: 0.18
  Version table:
 *** 0.18 500
        500 zesty/main amd64 Packages
        100 /var/lib/dpkg/status

3. netplan generate renders a config with MTU setting

4. root@z1:/etc/netplan# netplan generate
Error in network definition //etc/netplan/simple.yaml line 4 column 6: unknown key mtu

root@z1:/etc/netplan# cat simple.yaml
  version: 2
      dhcp4: true
      mtu: 1280

ProblemType: Bug
DistroRelease: Ubuntu 17.04
Package: nplan 0.18
ProcVersionSignature: Ubuntu 4.4.0-62.83-generic 4.4.40
Uname: Linux 4.4.0-62-generic x86_64
ApportVersion: 2.20.4-0ubuntu2
Architecture: amd64
Date: Tue Feb 28 16:47:13 2017
 PATH=(custom, no user)
SourcePackage: nplan
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Ryan Harper (raharper) wrote :
Ryan Harper (raharper) wrote :

I've filed a systemd bug for ipv6 mtu here (along with a potential patch)

Ryan Harper (raharper) wrote :

I suggest that we merge/land this MTU support first; and then I'll file another bug specifically for IPV6 Mtu support for netplan once we resolve the systemd bug.

Changed in nplan (Ubuntu):
status: New → In Progress
importance: Undecided → High
assignee: nobody → Mathieu Trudel-Lapierre (cyphermox)
milestone: none → ubuntu-17.03
Changed in nplan (Ubuntu):
milestone: ubuntu-17.03 → ubuntu-17.05
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nplan - 0.21

nplan (0.21) artful; urgency=medium

  [ Ryan Harper ]
  * Add support for setting MTU on a device. (LP: #1668693)

  [ Mathieu Trudel-Lapierre ]
  * Don't rebind Atheros AR9271; it would confuse the driver. (LP: #1672740)
  * debian/control: Add Conflicts: against netplan; the network 'plan' daemon.
    Both ship the same /usr/sbin/netplan. (LP: #1665842)

 -- Mathieu Trudel-Lapierre <email address hidden> Tue, 02 May 2017 09:37:57 -0400

Changed in nplan (Ubuntu):
status: In Progress → Fix Released
description: updated

Hello Ryan, or anyone else affected,

Accepted nplan into xenial-proposed. The package will build now and be available at in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at . Thank you in advance!

Changed in nplan (Ubuntu Xenial):
status: New → Fix Committed
tags: added: verification-needed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers