Merge ~danilogondolfo/network-manager/+git/network-manager:openvpn_test_fix into network-manager:ubuntu/master

Proposed by Danilo Egea Gondolfo
Status: Merged
Approved by: Sebastien Bacher
Approved revision: a65894904ab44a59680bf308f01f33bd6c0278bc
Merged at revision: a65894904ab44a59680bf308f01f33bd6c0278bc
Proposed branch: ~danilogondolfo/network-manager/+git/network-manager:openvpn_test_fix
Merge into: network-manager:ubuntu/master
Diff against target: 39 lines (+11/-2)
2 files modified
debian/changelog (+8/-0)
debian/tests/nm_netplan.py (+3/-2)
Reviewer Review Type Date Requested Status
Sebastien Bacher Approve
Lukas Märdian Approve
Review via email: mp+443566@code.launchpad.net

Description of the change

This change is intended to fix autopkgtest instances that are becoming unreachable when the OpenVPN test runs. It might be possible that the extra default route added for the test is the root cause. The route will be added with a lower priority so it will not be selected over the main default route.

To post a comment you must log in.
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks!

review: Approve
Revision history for this message
Lukas Märdian (slyon) wrote :

Nice, LGTM!

review: Approve
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index bcac073..56547d7 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,11 @@
6+network-manager (1.42.4-1ubuntu4) mantic; urgency=medium
7+
8+ * d/t/nm_netplan.py:openvpn: set a metric for the extra default route.
9+ With a higher metric the route shouldn't be selected over the main one.
10+ Also, use the same subnet already used by the nm.py tests.
11+
12+ -- Danilo Egea Gondolfo <danilo.egea.gondolfo@canonical.com> Thu, 25 May 2023 11:00:31 +0100
13+
14 network-manager (1.42.4-1ubuntu3) mantic; urgency=medium
15
16 * Upload netplan integration to the Ubuntu archive, details available on
17diff --git a/debian/tests/nm_netplan.py b/debian/tests/nm_netplan.py
18index cc86bcf..d02c8e5 100644
19--- a/debian/tests/nm_netplan.py
20+++ b/debian/tests/nm_netplan.py
21@@ -626,7 +626,7 @@ ca /tmp/openvpn/pki/ca.crt
22 cert /tmp/openvpn/pki/issued/server.crt
23 key /tmp/openvpn/pki/private/server.key
24 dh /tmp/openvpn/pki/dh.pem
25-server 10.8.0.0 255.255.255.0
26+server 192.168.5.0 255.255.255.0
27 keepalive 10 120
28 cipher AES-256-GCM
29 compress lz4-v2
30@@ -683,7 +683,8 @@ EASYRSA_BATCH=1 /usr/share/easy-rsa/easyrsa build-client-full client nopass
31 # us to start the VPN client.
32 # As we set the main ethernet device as unmanaged, NM will not 'own' a default route when it starts.
33 # Unfortunately, by doing this, NM will take over the interface 'lo' and add a new yaml file to /etc/netplan
34- self._nmcli(['con', 'mod', 'lo', 'ipv4.gateway', '10.8.0.254'])
35+ # We use metric 1000 so this default route will not be the preferred one.
36+ self._nmcli(['con', 'mod', 'lo', 'ipv4.gateway', '192.168.5.254', 'ipv4.route-metric', '1000'])
37
38 # Create an OpenVPN connection based on the configuration found in client.conf
39 self._nmcli(['con', 'import', 'type', 'openvpn', 'file', 'client.conf'])

Subscribers

People subscribed via source and target branches