Another bug with the new backend is that the route-metric isn't properly
applied. Example:

1) This works fine, using the original backend:

$ cat /etc/NetworkManager/system-connections/10.161.254.11.nmconnection

[connection]
id=10.161.254.11
uuid=21161f75-8d8a-46a8-a873-3532e2415e2a
type=ethernet
interface-name=eno1
timestamp=1697868305

[ethernet]

[ipv4]
address1=10.161.254.11/24,10.161.254.1
address2=192.168.254.11/24
route-metric=90
dns=127.0.0.1;
may-fail=false
method=manual

[ipv6]
addr-gen-mode=stable-privacy
ip6-privacy=0
may-fail=false
method=link-local

[proxy]

To verify it's fine:

$ ip r
default via 10.161.254.1 dev eno1 proto static metric 90 


2) Now we just re-set the name of the connection to toggle the conversion to 
the NM-backend, and things break, the metric is now 103 instead of 90:

$ nmcli con modify 10.161.254.11 con-name 10.161.254.11
$ nmcli con up 10.161.254.11
$ ip r
default via 10.161.254.1 dev eno1 proto static metric 103 
$ cat /etc/netplan/90-NM-21161f75-8d8a-46a8-a873-3532e2415e2a.yaml
network:
  version: 2
  ethernets:
    NM-21161f75-8d8a-46a8-a873-3532e2415e2a:
      renderer: NetworkManager
      match:
        name: "eno1"
      addresses:
      - "10.161.254.11/24"
      - "192.168.254.11/24"
      nameservers:
        addresses:
        - 127.0.0.1
      dhcp4-overrides:
        route-metric: 90
      ipv6-address-generation: "stable-privacy"
      wakeonlan: true
      networkmanager:
        uuid: "21161f75-8d8a-46a8-a873-3532e2415e2a"
        name: "10.161.254.11"
        passthrough:
          connection.timestamp: "1735895691"
          ethernet._: ""
          ipv4.address1: "10.161.254.11/24,10.161.254.1"
          ipv4.may-fail: "false"
          ipv4.method: "manual"
          ipv6.may-fail: "false"
          ipv6.method: "link-local"
          proxy._: ""

There are several other similar bugs that are caused by attributes that
don't map 1-to-1 between netplan and network-manager. Please allow us to
use the original network manager storage backend without recompiling the
sources, thank you.

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

Title:
  Provide an option to avoid the yaml NM backend

Status in netplan.io package in Ubuntu:
  Confirmed
Status in network-manager package in Ubuntu:
  Confirmed

Bug description:
  Hi, recently netplan added support for a yaml NM backend:

  https://discourse.ubuntu.com/t/call-for-testing-networkmanager-yaml-
  settings/32420

  The rationale is that "the descriptive YAML layer is especially useful
  in cloud environments":

  
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/556

  It's great that you care about that user group!
  Please also care for the rest of us that do not use cloud environments!

  For example, I routinely review, clone, backup or even directly edit
  the /etc/NetworkManager/system-connections files in my desktops and
  servers, in all distributions.

  Having an Ubuntu-specific way to do things will make things harder for
  me. I will have to learn a new Ubuntu-specific syntax, develop scripts
  and methods to convert my connections between distributions, I will
  need to discover and report bugs in the netplan <=> nm mapping etc...

  I.e. Ubuntu is great for the cloud, and it's awesome that you want to provide 
a unified yaml-based experience for cloud-init etc.
  But Ubuntu is also great outside the cloud; please allow us to continue 
having a unified experience between distributions (i.e. directly using nm or 
systemd-networkd) without enforcing an Ubuntu-specific way of doing things 
(netplan) to us.

  For Ubuntu 24.04+, please provide an option to avoid the yaml NM
  backend, thank you very much!

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/2041491/+subscriptions


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

Reply via email to