2023-10-19 13:40:24 |
Danilo Egea Gondolfo |
bug |
|
|
added bug |
2023-10-19 13:47:06 |
Danilo Egea Gondolfo |
description |
The Network Manager's GUI in gnome will emit a wireguard endpoint with an empty string ("") when it's omitted by the user. As Netplan is rejecting this configuration, NM will fail to create the connection.
This is addressed by this patch https://github.com/canonical/netplan/pull/414. Netplan will ignore endpoints that are empty strings. |
The Network Manager's GUI in gnome will emit a wireguard endpoint with an empty string ("") when it's omitted by the user. As Netplan is rejecting this configuration, NM will fail to create the connection.
This is addressed by this patch https://github.com/canonical/netplan/pull/414. Netplan will ignore endpoints that are empty strings.
This problem is related to this LP bug https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/2038811 |
|
2023-10-19 16:29:09 |
Launchpad Janitor |
merge proposal linked |
|
https://code.launchpad.net/~danilogondolfo/netplan/+git/netplan/+merge/454061 |
|
2023-10-26 07:51:24 |
Lukas Märdian |
nominated for series |
|
Ubuntu Mantic |
|
2023-10-26 07:51:24 |
Lukas Märdian |
bug task added |
|
netplan.io (Ubuntu Mantic) |
|
2023-10-26 08:45:02 |
Danilo Egea Gondolfo |
description |
The Network Manager's GUI in gnome will emit a wireguard endpoint with an empty string ("") when it's omitted by the user. As Netplan is rejecting this configuration, NM will fail to create the connection.
This is addressed by this patch https://github.com/canonical/netplan/pull/414. Netplan will ignore endpoints that are empty strings.
This problem is related to this LP bug https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/2038811 |
[ Impact ]
Creating a Wireguard tunnel using the GUI allows the user to omit the peer endpoint.
The configuration created by NetworkManager will still include the Endpoint= key with an empty string ("")
as its value. This configuration will then be imported into a Netplan state using libnetplan and the
resulting YAML file will include the empty string as the endpoint value. When libnetplan loads and parses
the resulting YAML, the validation process will not accept the empty string as the endpoint value and fail.
An endpoint that's an empty string should just be ignored.
[ Test Plan ]
How to reproduce the issues.
1) Launch a Mantic desktop instance on LXD (or any Mantic desktop installation)
$ lxc launch images:ubuntu/mantic/desktop mantic-desktop --vm -c limits.memory=2GiB --console=vga
2) Open the "Advanced Network Configuration" application
3) Add a new connection of type WireGuard
a) Set the interface name to wg0
b) Set the private key to 4GgaQCy68nzNsUE5aJ9fuLzHhB65tAlwbmA72MWnOm8=
c) In the "peers" section, click on Add
d) Set the "Public key" to M9nt4YujIOmNrRmpIRTmYSfMdrpvE7u6WkG8FY8WjG4=
e) Leave the other settings empty and click on Apply then Save
4) You will get an error message and will find the errors below in the Network Manager's journal:
Oct 20 10:01:07 mantic-desktop NetworkManager[3130]: /etc/netplan/90-NM-47e8e1b7-61c7-4568-8418-14b134382fcd.yaml:11:19: Error in network definition: invalid endpoint address or hostname ''
Oct 20 10:01:07 mantic-desktop NetworkManager[3130]: - endpoint: ""
Oct 20 10:01:07 mantic-desktop NetworkManager[3130]: ^
Oct 20 10:01:07 mantic-desktop NetworkManager[2775]: <error> [1697796067.1011] BUG: the profile cannot be stored in keyfile format without becoming unusable: cannot access file: No such file or directory
Oct 20 10:01:07 mantic-desktop NetworkManager[2775]: **
Oct 20 10:01:07 mantic-desktop NetworkManager[2775]: nm:ERROR:src/core/settings/plugins/keyfile/nms-keyfile-writer.c:551:<unknown-fcn>: assertion failed: (<dropped>)
Oct 20 10:01:07 mantic-desktop NetworkManager[2775]: Bail out! nm:ERROR:src/core/settings/plugins/keyfile/nms-keyfile-writer.c:551:<unknown-fcn>: assertion failed: (<dropped>)
Oct 20 10:01:07 mantic-desktop systemd[1]: NetworkManager.service: Main process exited, code=dumped, status=6/ABRT
Oct 20 10:01:07 mantic-desktop systemd[1]: NetworkManager.service: Failed with result 'core-dump'.
Testing the fixes
1) Add the PPA repository with the updated package and upgrade netplan
$ sudo add-apt-repository ppa:danilogondolfo/netplan-sru
$ sudo apt update && sudo apt upgrade -y
3) Restart Network Manager
$ sudo systemctl restart NetworkManager
4) Run the test described above again and check they will not cause any crashes
[ Where problems could occur ]
As we are only relaxing the validation of Wireguard endpoints to ignore empty strings
we are not expecting any regressions caused
by these changes. There are no intended changes in behavior introduced by these changes.
All the autopkgtests from netplan.io and network-manager are still passing with these patches.
--- Original description ---
The Network Manager's GUI in gnome will emit a wireguard endpoint with an empty string ("") when it's omitted by the user. As Netplan is rejecting this configuration, NM will fail to create the connection.
This is addressed by this patch https://github.com/canonical/netplan/pull/414. Netplan will ignore endpoints that are empty strings.
This problem is related to this LP bug https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/2038811 |
|
2023-10-26 09:37:24 |
Lukas Märdian |
netplan.io (Ubuntu): status |
New |
In Progress |
|
2023-10-26 09:37:26 |
Lukas Märdian |
netplan.io (Ubuntu Mantic): status |
New |
In Progress |
|
2023-10-26 09:37:32 |
Lukas Märdian |
bug |
|
|
added subscriber Ubuntu Stable Release Updates Team |
2023-10-26 09:43:47 |
Ubuntu Archive Robot |
bug |
|
|
added subscriber Lukas Märdian |
2023-10-31 06:10:05 |
Launchpad Janitor |
netplan.io (Ubuntu): status |
In Progress |
Fix Released |
|
2023-11-05 01:35:16 |
Steve Langasek |
netplan.io (Ubuntu Mantic): status |
In Progress |
Fix Committed |
|
2023-11-05 01:35:18 |
Steve Langasek |
bug |
|
|
added subscriber SRU Verification |
2023-11-05 01:35:24 |
Steve Langasek |
tags |
|
verification-needed verification-needed-mantic |
|
2023-11-14 14:59:09 |
Danilo Egea Gondolfo |
tags |
verification-needed verification-needed-mantic |
verification-done-mantic verification-needed |
|
2023-11-20 13:44:00 |
Łukasz Zemczak |
removed subscriber Ubuntu Stable Release Updates Team |
|
|
|
2023-11-20 13:43:59 |
Launchpad Janitor |
netplan.io (Ubuntu Mantic): status |
Fix Committed |
Fix Released |
|