On Mon, 2021-04-19 at 09:59 -0400, Lars Kellogg-Stedman via networkmanager-list wrote:
I have a system (an OpenShift bare metal node running RHCOS 47.83.202103051045-0) with NetworkManager 1.26.0. The system recently lost its public ip address. When I logged into the system, I saw: # nmcli c show NAME UUID TYPE DEVICE Wired connection 1 de1f2c7a-9fb9-3581-89ce-43cb3157db92 ethernet eno1 Wired connection 2 e2318199-ce78-35d4-91b0-b2b4a73fb6b6 ethernet -- Wired connection 3 e14a050c-e6c6-33f5-93ef-d1db97a39052 ethernet -- Wired connection 4 ae774310-1c88-3354-9d0d-82997bae23b5 ethernet -- Where "Wired connection 2" is supposed to be online for device eno2. The device is set correctly in the connection configuration: # nmcli c show 'Wired connection 2' [...] connection.interface-name: eno2 And the interface was in fact present, although it was showing NO-CARRIER (which is maybe why we lost the address in the first place, but doesn't explain the subsequent error): # ip addr show eno2 3: eno2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000 link/ether 90:b1:1c:3a:15:7f brd ff:ff:ff:ff:ff:ff When I tried to bring up the interface by running `nmcli c up "Wired connection 2"`, I received the following error: # nmcli c up 'Wired connection 2' Error: Connection activation failed: No suitable device found for this connection (device eno1 not available because profile is not compatible with device (mismatching interface name)). Why was this connection trying to use eno1 instead of eno2?
Because NetworkManager is looking for a suitable device, but it couldn't find any. Hence, it also wasn't smart enough, that eno2 would have been less wrong. If you had done $ nmcli connectoin up "Wired connection 2" ifname eno2 then the command would have still failed, but with a better error message (like "cable is not plugged in"). NetworkManager already tries to find the best of the unsuitable devices, patch welcome to make it smarter to understand that eno2 would have been better. Here: https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/34e4a3ef174005439af78278500290ce68e4bebb/src/core/nm-manager.c#L3845
After rebooting the system, the interface came up without a problem: # nmcli c show NAME UUID TYPE DEVICE Wired connection 2 e2318199-ce78-35d4-91b0-b2b4a73fb6b6 ethernet eno2 Wired connection 1 de1f2c7a-9fb9-3581-89ce-43cb3157db92 ethernet eno1 Wired connection 3 e14a050c-e6c6-33f5-93ef-d1db97a39052 ethernet -- Wired connection 4 ae774310-1c88-3354-9d0d-82997bae23b5 ethernet --
Attachment:
signature.asc
Description: This is a digitally signed message part