Tested 0.40.1 from -proposed; things look good here. root@b1:~# ls -al /etc/netplan/ total 9 drwxr-xr-x 2 root root 4 Oct 4 20:29 . drwxr-xr-x 87 root root 175 Oct 2 06:36 .. -rw-r--r-- 1 root root 381 Oct 1 14:53 50-cloud-init.yaml -rw-r--r-- 1 root root 0 Oct 1 15:16 99-empty.yaml root@b1:~# apt-cache policy netplan.io netplan.io: Installed: 0.40~18.04.1 Candidate: 0.40.1~18.04.1 Version table: 0.40.1~18.04.1 500 500 http://archive.ubuntu.com/ubuntu bionic-proposed/main amd64 Packages *** 0.40~18.04.1 100 100 /var/lib/dpkg/status 0.36.3 500 500 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages 0.36.1 500 500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages root@b1:~# netplan apply 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' root@b1:~# mv /etc/netplan/99-empty.yaml . root@b1:~# apt install netplan.io Reading package lists... Done Building dependency tree Reading state information... Done The following package was automatically installed and is no longer required: libfreetype6 Use 'apt autoremove' to remove it. Suggested packages: network-manager | wpasupplicant The following packages will be upgraded: netplan.io 1 upgraded, 0 newly installed, 0 to remove and 45 not upgraded. Need to get 63.8 kB of archives. After this operation, 0 B of additional disk space will be used. Get:1 http://archive.ubuntu.com/ubuntu bionic-proposed/main amd64 netplan.io amd64 0.40.1~18.04.1 [63.8 kB] Fetched 63.8 kB in 1s (108 kB/s) (Reading database ... 28509 files and directories currently installed.) Preparing to unpack .../netplan.io_0.40.1~18.04.1_amd64.deb ... Unpacking netplan.io (0.40.1~18.04.1) over (0.40~18.04.1) ... Setting up netplan.io (0.40.1~18.04.1) ... Processing triggers for man-db (2.8.3-2) ... root@b1:~# mv 99-empty.yaml /etc/netplan/ root@b1:~# netplan apply root@b1:~# networkctl status ● State: routable Address: 10.8.107.180 on eth0 fe80::216:3eff:fede:ccf1 on eth0 Gateway: 10.8.107.1 on eth0 DNS: 10.8.107.1 Search Domains: lxd
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. 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 To manage notifications about this bug go to: https://bugs.launchpad.net/netplan/+bug/1795343/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs