Unfortunately this is still happening with the patch from comment #3. In
fact I do not even need to create a VPN connection for this. If I
install easy-openvpn-server:

$ snap install easy-openvpn-server

it creates two tun devices (tun0 and tun1) that can be seen with "ip
address" command. That makes NM create the corresponding devices and
connections:

/ssh:ubuntu@localhost#8022: $ /snap/bin/network-manager.nmcli c
NAME          UUID                                  TYPE      DEVICE 
netplan-ens3  bec3d02a-c9e5-3283-92ab-ee43a4246c85  ethernet  ens3   
tun0          edc2d2e1-b126-475d-8d5b-1a5b3bfd43d3  tun       tun0   
tun1          2945f4f4-2d44-4a61-83b4-cee73fd81129  tun       tun1   
/ssh:ubuntu@localhost#8022: $ /snap/bin/network-manager.nmcli d
DEVICE  TYPE      STATE                   CONNECTION   
ens3    ethernet  connected               netplan-ens3 
tun0    tun       connected (externally)  tun0         
tun1    tun       connected (externally)  tun1         
lo      loopback  unmanaged    

but unfortunately these connections are still written as static
connections in /etc/netplan/. And when I reboot, I see 4 of them:

/ssh:ubuntu@localhost#8022: $ /snap/bin/network-manager.nmcli c 
NAME          UUID                                  TYPE      DEVICE 
netplan-ens3  bec3d02a-c9e5-3283-92ab-ee43a4246c85  ethernet  ens3   
tun0          864e0de2-e5c6-4c9b-aa7f-20aef970067c  tun       tun0   
tun1          ddfc7db2-2baa-488f-95da-c8e1e66e458b  tun       tun1   
default       be2bc22c-fc98-4b2b-9484-fd4d5c838d5f  vpn       --     
tun0          3c1e12f9-1a08-4a6f-aef3-5ea22d9e9bb2  tun       --     
tun1          eb8ed73b-3312-401f-a4c4-c26aadb3a014  tun       --    

The files look like https://paste.ubuntu.com/p/KvTVXPwK75/

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to network-manager in Ubuntu.
https://bugs.launchpad.net/bugs/1998207

Title:
  netplan network-manager plugin tries to save temporary connections

Status in netplan:
  Triaged
Status in network-manager package in Ubuntu:
  Fix Committed

Bug description:
  When creating an OpenVPN connection, a temporal connection called tunN
  is created. For instance, after activating a connection called
  vpntest, I have:

  NAME          UUID                                  TYPE      DEVICE 
  vpntest       458856e6-8f0f-4dc6-82f2-dd72868252a0  vpn       ens3   
  tun0          1eb1dbe8-5678-4818-9adf-fb2dc01ed132  tun       tun0   

  tun0 is created/removed after activating/deactivating vpntest and
  should not really be saved, but I see netplan adding it in
  /etc/netplan. And while doing so the plugin also reports some errors
  (I see these when stopping the connection):

  Nov 28 16:16:57 ubuntu NetworkManager[11752]: <error> [1669652217.2920] BUG: 
the profile cannot be stored in keyfile format without becoming unusable: 
cannot access file: No such file or directory
  Nov 28 16:16:57 ubuntu NetworkManager[11752]: 
((src/libnm-core-impl/nm-connection.c:342)): assertion '<dropped>' failed
  Nov 28 16:16:57 ubuntu NetworkManager[11752]: <warn>  [1669652217.2920] 
keyfile: commit: failure to write 1eb1dbe8-5678-4818-9adf-fb2dc01ed132 ((null)) 
to 
"/run/NetworkManager/system-connections/tun0-1eb1dbe8-5678-4818-9adf-fb2dc01ed132.nmconnection":
 keyfile writer produces an invalid connection: cannot access file: No such 
file or directory

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


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to