[Bug 1959570] Re: netplan crashes on UbuntuCore with the network-manager snap installed

Lukas Märdian 1959570 at bugs.launchpad.net
Thu Mar 23 13:15:32 UTC 2023


** Also affects: netplan.io (Ubuntu Kinetic)
   Importance: Undecided
       Status: New

** Also affects: netplan.io (Ubuntu Lunar)
   Importance: High
       Status: Triaged

** Also affects: netplan.io (Ubuntu Focal)
   Importance: Undecided
       Status: New

** Also affects: netplan.io (Ubuntu Jammy)
   Importance: Undecided
       Status: New

-- 
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/1959570

Title:
  netplan crashes on UbuntuCore with the network-manager snap installed

Status in netplan:
  In Progress
Status in netplan.io package in Ubuntu:
  Triaged
Status in netplan.io source package in Focal:
  New
Status in netplan.io source package in Jammy:
  New
Status in netplan.io source package in Kinetic:
  New
Status in netplan.io source package in Lunar:
  Triaged

Bug description:
  When using the netplan-dbus API on Ubuntu Core and the network-manager
  renderer the "netplan-dbus" appication will crash. To reproduce take a
  UC20 or UC22 system and run:

  ```
  $ sudo snap set system system.network.netplan.network.bridges.br54.dhcp4=true
  ```
  (which in effect just drives the dbus API of netplan).

  After that the network is lost. When manually restarting it the error is:
  ```
  error: cannot perform the following tasks:
  - Run configure hook of "core" snap (run hook "configure": cannot try netplan config: no specific reason returned from netplan and cannot cancel netplan config: Unknown object '/io/netplan/Netplan/config/VDDSG1'.)
  ```

  and the journal reports:
  ```
  Jan 31 10:46:04 ubuntu sudo[1746]:      mvo : TTY=pts/0 ; PWD=/home/mvo ; USER=root ; COMMAND=/usr/bin/snap set system system.network.netplan.network.bridges.br54.dhcp4=true
  Jan 31 10:46:04 ubuntu sudo[1746]: pam_unix(sudo:session): session opened for user root(uid=0) by mvo(uid=1000)
  Jan 31 10:46:05 ubuntu io.netplan.Netplan[1763]: Traceback (most recent call last):
  Jan 31 10:46:05 ubuntu io.netplan.Netplan[1763]:   File "/usr/share/netplan/netplan/cli/commands/try_command.py", line 99, in command_try
  Jan 31 10:46:05 ubuntu io.netplan.Netplan[1763]:     NetplanApply().command_apply(run_generate=True, sync=True, exit_on_error=False, state_dir=self.state)
  Jan 31 10:46:05 ubuntu io.netplan.Netplan[1763]:   File "/usr/share/netplan/netplan/cli/commands/apply.py", line 272, in command_apply
  Jan 31 10:46:05 ubuntu io.netplan.Netplan[1763]:     if b'\nconnected' in subprocess.check_output(cmd, env=env):
  Jan 31 10:46:05 ubuntu io.netplan.Netplan[1763]:   File "/usr/lib/python3.9/subprocess.py", line 424, in check_output
  Jan 31 10:46:05 ubuntu io.netplan.Netplan[1763]:     return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  Jan 31 10:46:05 ubuntu io.netplan.Netplan[1763]:   File "/usr/lib/python3.9/subprocess.py", line 505, in run
  Jan 31 10:46:05 ubuntu io.netplan.Netplan[1763]:     with Popen(*popenargs, **kwargs) as process:
  Jan 31 10:46:05 ubuntu io.netplan.Netplan[1763]:   File "/usr/lib/python3.9/subprocess.py", line 951, in __init__
  Jan 31 10:46:05 ubuntu io.netplan.Netplan[1763]:     self._execute_child(args, executable, preexec_fn, close_fds,
  Jan 31 10:46:05 ubuntu io.netplan.Netplan[1763]:   File "/usr/lib/python3.9/subprocess.py", line 1821, in _execute_child
  Jan 31 10:46:05 ubuntu io.netplan.Netplan[1763]:     raise child_exception_type(errno_num, err_msg, err_filename)
  Jan 31 10:46:05 ubuntu io.netplan.Netplan[1763]: FileNotFoundError: [Errno 2] No such file or directory: 'nmcli'
  Jan 31 10:46:05 ubuntu io.netplan.Netplan[1763]: During handling of the above exception, another exception occurred:
  Jan 31 10:46:05 ubuntu io.netplan.Netplan[1763]: Traceback (most recent call last):
  Jan 31 10:46:05 ubuntu io.netplan.Netplan[1763]:   File "/usr/sbin/netplan", line 23, in <module>
  Jan 31 10:46:05 ubuntu io.netplan.Netplan[1763]:     netplan.main()
  Jan 31 10:46:05 ubuntu io.netplan.Netplan[1763]:   File "/usr/share/netplan/netplan/cli/core.py", line 50, in main
  Jan 31 10:46:05 ubuntu io.netplan.Netplan[1763]:     self.run_command()
  Jan 31 10:46:05 ubuntu io.netplan.Netplan[1763]:   File "/usr/share/netplan/netplan/cli/utils.py", line 315, in run_command
  Jan 31 10:46:05 ubuntu io.netplan.Netplan[1763]:     self.func()
  Jan 31 10:46:05 ubuntu io.netplan.Netplan[1763]:   File "/usr/share/netplan/netplan/cli/commands/try_command.py", line 81, in run
  Jan 31 10:46:05 ubuntu io.netplan.Netplan[1763]:     self.run_command()
  Jan 31 10:46:05 ubuntu io.netplan.Netplan[1763]:   File "/usr/share/netplan/netplan/cli/utils.py", line 315, in run_command
  Jan 31 10:46:05 ubuntu io.netplan.Netplan[1763]:     self.func()
  Jan 31 10:46:05 ubuntu io.netplan.Netplan[1763]:   File "/usr/share/netplan/netplan/cli/commands/try_command.py", line 113, in command_try
  Jan 31 10:46:05 ubuntu io.netplan.Netplan[1763]:     self.revert()
  Jan 31 10:46:05 ubuntu io.netplan.Netplan[1763]:   File "/usr/share/netplan/netplan/cli/commands/try_command.py", line 143, in revert
  Jan 31 10:46:05 ubuntu io.netplan.Netplan[1763]:     NetplanApply().command_apply(run_generate=False, sync=True, exit_on_error=False, state_dir=tempdir)
  Jan 31 10:46:05 ubuntu io.netplan.Netplan[1763]:   File "/usr/share/netplan/netplan/cli/commands/apply.py", line 272, in command_apply
  Jan 31 10:46:05 ubuntu io.netplan.Netplan[1763]:     if b'\nconnected' in subprocess.check_output(cmd, env=env):
  Jan 31 10:46:05 ubuntu io.netplan.Netplan[1763]:   File "/usr/lib/python3.9/subprocess.py", line 424, in check_output
  Jan 31 10:46:05 ubuntu io.netplan.Netplan[1763]:     return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  Jan 31 10:46:05 ubuntu io.netplan.Netplan[1763]:   File "/usr/lib/python3.9/subprocess.py", line 505, in run
  Jan 31 10:46:05 ubuntu io.netplan.Netplan[1763]:     with Popen(*popenargs, **kwargs) as process:
  Jan 31 10:46:05 ubuntu io.netplan.Netplan[1763]:   File "/usr/lib/python3.9/subprocess.py", line 951, in __init__
  Jan 31 10:46:05 ubuntu io.netplan.Netplan[1763]:     self._execute_child(args, executable, preexec_fn, close_fds,
  Jan 31 10:46:05 ubuntu io.netplan.Netplan[1763]:   File "/usr/lib/python3.9/subprocess.py", line 1821, in _execute_child
  Jan 31 10:46:05 ubuntu io.netplan.Netplan[1763]:     raise child_exception_type(errno_num, err_msg, err_filename)
  Jan 31 10:46:05 ubuntu io.netplan.Netplan[1763]: FileNotFoundError: [Errno 2] No such file or directory: 'nmcli'
  Jan 31 10:46:10 ubuntu io.netplan.Netplan[884]: 'netplan try' exited with status: 0
  Jan 31 10:46:10 ubuntu snapd[605]: taskrunner.go:271: [change 13 "Run configure hook of \"core\" snap" task] failed: run hook "configure": cannot try netplan config: no specific reason returned from netplan and cannot cancel netplan config: Unknown object '/io/netplan/Netplan/config/LX32G1'.
  ```

  The full journal log is attached.

  I guess it's a bit the question if this is a netplan or a nm-snap bug
  (it might need to provide an nmcli alias?). But in any case the crash
  and losing network is worth fixing regardless I think.

  Fwiw, I also suspect this is the issue that prevents my spread tests
  in https://github.com/snapcore/snapd/compare/master...mvo5:netplan-
  read-write-nm?expand=1 from working.

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




More information about the foundations-bugs mailing list