You are not logged in.

#1 2020-01-29 15:05:00

Shepy
Member
Registered: 2020-01-29
Posts: 5

Using ConnMan - udev failed to rename my network interface

Hi,

Since i use ConnMan as network manager systemd-udevd can no longer rename my interface from eth0 to eno1

journalctl -b -u systemd-udevd :

systemd[1]: Started udev Kernel Device Manager.
systemd-udevd[264]: ethtool: autonegotiation is unset or enabled, the speed and duplex are not writable.
systemd-udevd[262]: Using default interface naming scheme 'v243'.
systemd-udevd[262]: ethtool: autonegotiation is unset or enabled, the speed and duplex are not writable.
systemd-udevd[262]: eth0: Failed to rename network interface 2 from 'eth0' to 'eno1': Device or resource busy       <---------- there
systemd-udevd[262]: eth0: Failed to process device, ignoring: Device or resource busy

I imagine ConnMan is using the interface when the udev rule tries to rename it, hence the error message ?
I thought of changing the "loading order" of the units with a drop in file with After or Before to let udev rename the interface before connman uses it. But I await your feedback smile

Of course, disabling connman.service makes the error go away.

Apart from the error message everything works correctly.


(Since it's not a 100% "Networking" related issue, I may have used the wrong forum section, if that's the case, my apologies)

Offline

#2 2020-01-29 16:39:24

Zod
Member
From: Hoosiertucky
Registered: 2019-03-10
Posts: 634

Re: Using ConnMan - udev failed to rename my network interface

$ systemctl list-unit-files --state=enabled

Offline

#3 2020-01-29 16:44:45

Shepy
Member
Registered: 2020-01-29
Posts: 5

Re: Using ConnMan - udev failed to rename my network interface

UNIT FILE               STATE
autovt@.service         enabled
connman.service         enabled
display-manager.service enabled
getty@.service          enabled
sddm.service            enabled
sshd.service            enabled
remote-fs.target        enabled

7 unit files listed.

--------------------------------------------------------

I tried with dhcpcd (much faster btw, 5ms boot time) and no issue, because dhcpcd seem to start after the renaming

-- Reboot --
nuc systemd[1]: Started udev Kernel Device Manager.
nuc systemd-udevd[275]: ethtool: autonegotiation is unset or enabled, the speed and duplex are not writable.
nuc systemd-udevd[262]: Using default interface naming scheme 'v243'.
nuc systemd-udevd[262]: ethtool: autonegotiation is unset or enabled, the speed and duplex are not writable.
nuc systemd-udevd[265]: Using default interface naming scheme 'v243'.
nuc systemd[1]: Starting dhcpcd on eno1...
dhcpcd[349]: forked to background, child pid 354
systemd[1]: Started dhcpcd on eno1.
dhcpcd[354]: eno1: waiting for carrier
dhcpcd[354]: eno1: carrier acquired

Last edited by Shepy (2020-01-29 17:02:29)

Offline

#4 2020-01-29 17:39:35

rsmarples
Member
Registered: 2009-05-12
Posts: 287

Re: Using ConnMan - udev failed to rename my network interface

Shepy wrote:

[I tried with dhcpcd (much faster btw, 5ms boot time) and no issue, because dhcpcd seem to start after the renaming

dhcpcd has a udev plugin which only allows an interface to come online *after* being given the OK by udev.

Offline

#5 2020-01-29 20:19:18

Shepy
Member
Registered: 2020-01-29
Posts: 5

Re: Using ConnMan - udev failed to rename my network interface

rsmarples wrote:

dhcpcd has a udev plugin which only allows an interface to come online *after* being given the OK by udev.

Thanks for the hint M. dhcpcd smile

I looked a bit your source, and somewhere your are talking about systemd-udev-settle, after some research it is indeed quite useful.

I then modified my drop in file for connman

[Service]
ExecStartPre=udevadm settle
ExecStart=
ExecStart=/usr/bin/connmand -n -p ethernet -c /etc/connman/main.conf

But since udevadm settle wait for ALL event to finish it's quite slow ... (600+ms)

If I understand correctly this is your "per device initialization checks" ?
Using the lib udev you are just chekcing for net devices ... nicelly done


Since i'm really not a C guy, I have no clue on how to implement this for connman .. and my tweaked dhcpcd take 5ms to boot so I may stick with it..
But maybe someone will suggest the idea to connman maintainers

Offline

Board footer

Powered by FluxBB