[Bug 1795343] Re: netplan backported on bionic (0.40~18.04.1) crash when there is an empty YAML configuration file

Launchpad Bug Tracker 1795343 at bugs.launchpad.net
Wed Dec 5 18:47:48 UTC 2018


This bug was fixed in the package netplan.io - 0.40.1~18.04.3

---------------
netplan.io (0.40.1~18.04.3) bionic; urgency=medium

  * Fix idempotency in renaming: bond members should be exempt from rename, as
    they may all share a single MAC for the bond device. (LP: #1802322)
  * tests/integration.py: add test designed to catch the above regression.

netplan.io (0.40.1~18.04.2) bionic; urgency=medium

  * Fix typo breaking rename on 'netplan apply'. (LP: #1770082)

netplan.io (0.40.1~18.04.1) bionic; urgency=medium

  * Backport netplan 0.40.1 to 18.04. (LP: #1793309)

netplan.io (0.40.1) cosmic; urgency=medium

  * tests/generate.py: use random.sample() instead of random.choices() to
    better support older pythons.
  * Deal gracefully with empty files on 'netplan apply' (LP: #1795343)

netplan.io (0.40) cosmic; urgency=medium

  * New upstream release:
    - networkd: route source is PreferredSource= not From=
    - Improve NetworkManager error reporting on unrenderable routes.
    - Don't render ipv4 dns-search unless we have an ipv4 address.
      (LP: #1786726)
    - Set permissive umask on networkd .network, .link and .netdev files
      (LP: #1736965, LP: #1768560)
    - Fix support for link-scope routes. (LP: #1747455)
    - Update man pages for deletion of replug code.
    - Spell Gratuitous ARP correctly and make it work. (LP: #1756701)
    - Many typo fixes for documentation. (LP: #1783940)
    - Various build system fixes.
    - Fix integration tests:
      - iproute2 output changes for link-scope routes
      - fix stability of networkd igmp-resend test
      - fix manual_addresses test now that networkd lists ~. domain
    - Deduplicate code for parsing interface options
    - Add support for optional-addresses.

netplan.io (0.39) cosmic; urgency=medium

  * New upstream release:
    - Allow link-local addresses to be configured. (LP: #1771704)
    - Forces bridges with no addresses to be brought online. (LP: #1736975)

netplan.io (0.38) cosmic; urgency=medium

  * New upstream release:
    - Write udev .rules files to /run/udev/rules.d to enforce interface
      renaming. (LP: #1770082)
    - Don't traceback for 'netplan ip leases' when iface is not managed or
      doesn't DHCP (LP: #1768823)
    - Fix duplicate "/" path separator in error messages (LP: #1771440)
    - Fix incorrect terminal reset in 'netplan try' on Ctrl-C. (LP: #1768798)
    - Updated doc entries: mtu, fix fwmark->mark, cleanup optional.
      (LP: #1768783)
    - Added documentation validation at build.
    - Added configuration example for multi-ip interfaces.
  * tests/integration.py: fix test_eth_and_bridge autopkg test harder.
  * debian/control:
    - Add iproute2 to Depends.
    - Add python3-netifaces to Depends, Build-Depends.

 -- Mathieu Trudel-Lapierre <cyphermox at ubuntu.com>  Wed, 21 Nov 2018
14:42:59 -0500

** Changed in: netplan.io (Ubuntu Bionic)
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to netplan.io in Ubuntu.
Matching subscriptions: foundations-bugs
https://bugs.launchpad.net/bugs/1795343

Title:
  netplan backported on bionic (0.40~18.04.1) crash when there is an
  empty YAML configuration file

Status in netplan:
  Confirmed
Status in netplan.io package in Ubuntu:
  Fix Released
Status in netplan.io source package in Bionic:
  Fix Released

Bug description:
  [Impact]
  Any Netplan user leaving empty files in /etc/netplan.

  [Test case]

  1) put a valid configuration under /etc/netplan/
  2) create an empty YAML file /etc/netplan/99-empty.yaml
  3) execute netplan apply

  Validate that 'netplan apply' does not crash, and correctly applies
  the configuration.

  
  [Regression potential]
  Watch out for issues in merging netplan configuration or evaluating the parts of configuration that can't be reverted safely, for the use of 'netplan try'.

  ---

  Traceback (most recent call last):
    File "/usr/sbin/netplan", line 23, in <module>
      netplan.main()
    File "/usr/share/netplan/netplan/cli/core.py", line 50, in main
      self.run_command()
    File "/usr/share/netplan/netplan/cli/utils.py", line 130, in run_command
      self.func()
    File "/usr/share/netplan/netplan/cli/commands/apply.py", line 43, in run
      self.run_command()
    File "/usr/share/netplan/netplan/cli/utils.py", line 130, in run_command
      self.func()
    File "/usr/share/netplan/netplan/cli/commands/apply.py", line 83, in command_apply
      config_manager.parse()
    File "/usr/share/netplan/netplan/configmanager.py", line 111, in parse
      self._merge_yaml_config(yaml_file)
    File "/usr/share/netplan/netplan/configmanager.py", line 197, in _merge_yaml_config
      network = yaml_data.get('network')
  AttributeError: 'NoneType' object has no attribute 'get'
  Error in sys.excepthook:
  Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 145, in apport_excepthook
      os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o640), 'wb') as f:
  FileNotFoundError: [Errno 2] No such file or directory: '/var/crash/_usr_share_netplan_netplan.script.0.crash'

  Original exception was:
  Traceback (most recent call last):
    File "/usr/sbin/netplan", line 23, in <module>
      netplan.main()
    File "/usr/share/netplan/netplan/cli/core.py", line 50, in main
      self.run_command()
    File "/usr/share/netplan/netplan/cli/utils.py", line 130, in run_command
      self.func()
    File "/usr/share/netplan/netplan/cli/commands/apply.py", line 43, in run
      self.run_command()
    File "/usr/share/netplan/netplan/cli/utils.py", line 130, in run_command
      self.func()
    File "/usr/share/netplan/netplan/cli/commands/apply.py", line 83, in command_apply
      config_manager.parse()
    File "/usr/share/netplan/netplan/configmanager.py", line 111, in parse
      self._merge_yaml_config(yaml_file)
    File "/usr/share/netplan/netplan/configmanager.py", line 197, in _merge_yaml_config
      network = yaml_data.get('network')
  AttributeError: 'NoneType' object has no attribute 'get'

  This is a regression with the previous version.

  apt policy netplan.io
  netplan.io:
    Installé : 0.40~18.04.1
    Candidat : 0.40~18.04.1
   Table de version :
   *** 0.40~18.04.1 500
          500 http://fr.archive.ubuntu.com/ubuntu bionic-proposed/main amd64 Packages
          100 /var/lib/dpkg/status
       0.36.3 500
          500 http://fr.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
       0.36.1 500
          500 http://fr.archive.ubuntu.com/ubuntu bionic/main amd64 Packages

  Distributor ID:	Ubuntu
  Description:	Ubuntu 18.04.1 LTS
  Release:	18.04
  Codename:	bionic

To manage notifications about this bug go to:
https://bugs.launchpad.net/netplan/+bug/1795343/+subscriptions



More information about the foundations-bugs mailing list