netplan generate error message points to the wrong line number

Bug #1752956 reported by Ryan Harper on 2018-03-02
This bug affects 2 people
Affects Status Importance Assigned to Milestone
nplan (Ubuntu)
Mathieu Trudel-Lapierre

Bug Description

root@b2:~# lsb_release -rd
Description: Ubuntu Bionic Beaver (development branch)
Release: 18.04

root@b2:~# cat /etc/cloud/
build_name: server
serial: 20180224

root@b2:~# apt-cache policy nplan
  Installed: 0.33
  Candidate: 0.33
  Version table:
 *** 0.33 500
        500 bionic/main amd64 Packages
        100 /var/lib/dpkg/status

3. netplan generate detects invalid config, in error message reports the line and column correctly to where the error was found.

4. netplan generate reports an error, but the location isn't accurate.

root@b2:~# cat /etc/netplan/50-cloud-init.yaml
# This file is generated from information provided by
# the datasource. Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
    version: 2
            dhcp4: true
            mtu: 1501
            - 2001:4800:78ff:1b:be76:4eff:fe06:96b3/64
            addresses: []
            accept-ra: true

     id: 45
     link: eth0

root@b2:~# netplan generate
Error in network definition //etc/netplan/50-cloud-init.yaml line 5 column 0: unknown key vlans

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: nplan 0.33
ProcVersionSignature: Ubuntu 4.13.0-32.35~16.04.1-generic 4.13.13
Uname: Linux 4.13.0-32-generic x86_64
ApportVersion: 2.20.8-0ubuntu10
Architecture: amd64
Date: Fri Mar 2 18:51:49 2018
 PATH=(custom, no user)
SourcePackage: nplan
UpgradeStatus: No upgrade log present (probably fresh install)

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

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in nplan (Ubuntu):
status: New → Confirmed
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :
Changed in nplan (Ubuntu):
status: Confirmed → In Progress
importance: Undecided → Medium
assignee: nobody → Mathieu Trudel-Lapierre (cyphermox)
Revision history for this message
Thiago Vincenzi Conrado (tconrado) wrote :

I have similar issue, and it got ok after setting the same column alignment for the keyword of ethernets

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

Other bug subscribers