Veth pairs fail activation on Jammy

Bug #2032824 reported by Danilo Egea Gondolfo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
network-manager (Ubuntu)
New
Undecided
Unassigned
Jammy
New
Low
Unassigned

Bug Description

Network Manager 1.36 has a bug that prevents it to activate veth pairs. The problem was found in the Netplan's CI with the new support for veths in Netplan (because we run the tests on Jammy).

How to reproduce the problem:

1) Launch a Jammy VM and install network-manager

lxc launch ubuntu:jammy jammy --vm
lxc shell jammy
apt -y install network-manager

2) Set the default Netplan's renderer to NetworkManager so NM can manage interfaces (it will make Netplan create the file /var/run/NetworkManager/conf.d/10-globally-managed-devices.conf)

netplan set --origin-hint=50-cloud-init network.renderer=NetworkManager
netplan apply

3) Create the veth pair

nmcli con add type veth ifname veth0 peer veth1 ipv4.method disabled ipv6.method disabled
nmcli con add type veth ifname veth1 peer veth0 ipv4.method disabled ipv6.method disabled

4) Reboot

5) Check with "nmcli con show" that the new connections were not activated, even though both interfaces were created in the system. Also, check the systemd journal and you should see this error message:

<error> [1692805758.9025] manager: (veth-veth0) couldn't create the device: Failed to create veth interface 'veth0' for 'veth-veth0': exists

Try the very same steps on Lunar and you'll see that the connections will be activated just fine.

This issue appears to be fixed by this commit https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/commit/4655b7c308461ae1f86d592ea6d45e00a2820423

I created a PPA with the fix here https://launchpad.net/~danilogondolfo/+archive/ubuntu/network-manager

If you run the same steps again on Jammy with this PPA you'll see it fixes this issue. In fact, Netplan's integration tests will work on Jammy using the PPA.

Related branches

Revision history for this message
Danilo Egea Gondolfo (danilogondolfo) wrote :

I linked the patch I used for analysis.

Changed in network-manager (Ubuntu Jammy):
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.