Call trace occurred when running `netplan apply` after an yaml is removed

Bug #1878928 reported by Vic Liu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
netplan.io (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Call trace occurred when running `netplan apply` after an yaml was removed.

System: Intel NUC7CJYH
Image: Ubuntu Core 20 beta daily build (20200514.2)

Steps to Reproduce:
1. $ sudo rm /etc/netplan/n-wpa.yaml
2. $ sudo netplan apply, then the following call trace occurred:

Warning: The unit file, source configuration file or drop-ins of netplan-wpa-wlo2.service changed on disk. Run 'systemctl daemon-reload' to reload units.
Failed to start netplan-wpa-wlo2.service: Unit netplan-wpa-wlo2.service not found.
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 179, in run_command
    self.func()
  File "/usr/share/netplan/netplan/cli/commands/apply.py", line 46, in run
    self.run_command()
  File "/usr/share/netplan/netplan/cli/utils.py", line 179, in run_command
    self.func()
  File "/usr/share/netplan/netplan/cli/commands/apply.py", line 173, in command_apply
    utils.systemctl_networkd('start', sync=sync, extra_services=netplan_wpa)
  File "/usr/share/netplan/netplan/cli/utils.py", line 86, in systemctl_networkd
    subprocess.check_call(command)
  File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['systemctl', 'start', '--no-block', 'systemd-networkd.service', 'netplan-wpa-wlo2.service']' returned non-zero exit status 5.

Tags: uc20
Chris Wayne (cwayne)
tags: added: uc20
Revision history for this message
Lukas Märdian (slyon) wrote :

What is the netplan version this is happening with?

Might it be a duplicate of https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/1874494 ?
If so, the call trace should have been fixed with netplan.io_0.99-0ubuntu3~20.04.1

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Fix for this issue is available in the edge channel only at the moment.

Please verify that you do not observe the crash, before we promote to beta.

(calling daemon-reload is still needed however, until next netplan.io SRU, but it's minor in UX compared with out right crash, see other bug report for details)

Changed in netplan.io (Ubuntu):
status: New → Fix Committed
Revision history for this message
Claudio Matsuoka (cmatsuoka) wrote :

Fix seems good, I couldn't reproduce this bug using core20 663/665 from edge.

Revision history for this message
Claudio Matsuoka (cmatsuoka) wrote :

Systems tested: qemu, rpi4 (1GB)

Lukas Märdian (slyon)
Changed in netplan.io (Ubuntu):
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.