Public bug reported: 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. ** Affects: netplan.io (Ubuntu) Importance: Undecided Status: New ** Attachment added: "full journal log" https://bugs.launchpad.net/bugs/1959570/+attachment/5558406/+files/nm-crash-full-journal.txt ** Description changed: 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. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1959570 Title: netplan crashes on UbuntuCore with the network-manager snap installed To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/1959570/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
