Hello Lukas, I am the person who raised the issue with the cloud-init folks about this difference.
I would not call it a fix, but rather a workaround for a configuration that behaves differently with systemd on focal version. Now whether it is a simple issue to be fixed on systemd is another story. The "on-link: true" will be used for our cloud-init issue but it would still be nice to have the same behavior on focal. TIA, ...Louis -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to systemd in Ubuntu. https://bugs.launchpad.net/bugs/2073869 Title: systemd-networkd refuses to apply route with gateway out of the NIC's subnet Status in cloud-init package in Ubuntu: Invalid Status in netplan.io package in Ubuntu: Invalid Status in systemd package in Ubuntu: New Status in cloud-init source package in Focal: New Status in netplan.io source package in Focal: New Status in systemd source package in Focal: New Bug description: The version of systemd-networkd on Ubuntu Focal refuses to configure a route due to the fact that the address of the gateway is outside of the subnet of the NIC. The onlink option is required. This does not happen on Jammy and Noble. Steps to reproduce: ``` # ip a 2: ens2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000 link/ether de:00:00:62:c5:e9 brd ff:ff:ff:ff:ff:ff inet 212.47.xxx.xxx/32 scope global dynamic ens2 valid_lft 800sec preferred_lft 800sec inet6 2001:xxx:xxx:xxxx:xxxx:xx:xxxx:c5e9/64 scope global valid_lft forever preferred_lft forever inet6 fe80::dc00:ff:fe62:c5e9/64 scope link valid_lft forever preferred_lft forever # cat /etc/netplan/50-cloud-init.yaml version: 2 ethernets: ens2: addresses: - 2001:xxx:xxx:xxxx:xxxx:xx:xxxx:c5e9/64 dhcp4: true routes: - to: 169.254.42.42/32 via: 62.210.0.1 - to: ::/0 via: fe80::dc00:ff:fe62:c5ea # netplan apply # journalctl -b -u systemd-networkd ... Jul 18 10:05:59 focal systemd-networkd[668]: ens2: Could not set route: Nexthop has invalid gateway. Network is unreachable ... ``` Is this something that netplan fixes and presents it in a better way to networkd in newer versions? Or is this something that networkd improves in newer versions? cloud-init's upstream bug: https://github.com/canonical/cloud- init/issues/5523 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/2073869/+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