Du bist nicht angemeldet.

#1 23.11.2019 07:40:07

segfault
Mitglied

iwd + systemd-networkd: iwd startet (manchmal) zu zeitig

Moin!

Ich habe auf einem Laptop iwd + systemd-networkd. Ich möchte, entgegen den iwd Maintainern, die systemd predictable Interfacenames verwenden. Deswegen habe ich wie im Wiki angegeben konfiguriert:

$ systemctl cat iwd.service 
# /usr/lib/systemd/system/iwd.service
[Unit]
Description=Wireless service
Before=network.target
Wants=network.target

[Service]
Type=dbus
BusName=net.connman.iwd
ExecStart=/usr/lib/iwd/iwd
NotifyAccess=main
LimitNPROC=1
Restart=on-failure
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_RAW
PrivateTmp=true
NoNewPrivileges=true
DevicePolicy=closed
DeviceAllow=/dev/rfkill rw
ProtectHome=yes
ProtectSystem=strict
ProtectControlGroups=yes
ProtectKernelModules=yes
ConfigurationDirectory=iwd
StateDirectory=iwd
StateDirectoryMode=0700

[Install]
WantedBy=multi-user.target

# /etc/systemd/system/iwd.service.d/override.conf
[Unit]
After=systemd-udevd.service systemd-networkd.service

Leider klappt das nicht zuverlässig bei jedem Boot. Es kann auch passieren, das iwd vor systemd-networkd startet, was fatal ist:

$ journalctl -b -1 --unit=iwd.service --unit=systemd-networkd.service --unit=systemd-udevd.service --no-hostname --no-pager
-- Logs begin at Wed 2019-11-06 17:52:20 CET, end at Sat 2019-11-23 06:06:11 CET. --
Nov 22 04:57:35 systemd-udevd[193]: /usr/lib/udev/rules.d/11-dm-lvm.rules:40 Invalid value for OPTIONS key, ignoring: 'event_timeout=180'
Nov 22 04:57:35 systemd-udevd[193]: /usr/lib/udev/rules.d/11-dm-lvm.rules:40 The line takes no effect, ignoring.
Nov 22 04:57:35 systemd-udevd[193]: /usr/lib/udev/rules.d/50-udev-default.rules:24 The line takes no effect, ignoring.
Nov 22 04:57:35 systemd-udevd[193]: /usr/lib/udev/rules.d/50-udev-default.rules:25 The line takes no effect, ignoring.
Nov 22 04:57:35 systemd-udevd[193]: /usr/lib/udev/rules.d/50-udev-default.rules:29 The line takes no effect, ignoring.
Nov 22 04:57:35 systemd-udevd[193]: /usr/lib/udev/rules.d/50-udev-default.rules:32 The line takes no effect, ignoring.
Nov 22 04:57:35 systemd-udevd[193]: /usr/lib/udev/rules.d/50-udev-default.rules:33 The line takes no effect, ignoring.
Nov 22 04:57:35 systemd-udevd[193]: /usr/lib/udev/rules.d/50-udev-default.rules:34 The line takes no effect, ignoring.
Nov 22 04:57:35 systemd-udevd[193]: /usr/lib/udev/rules.d/50-udev-default.rules:35 The line takes no effect, ignoring.
Nov 22 04:57:35 systemd-udevd[193]: /usr/lib/udev/rules.d/50-udev-default.rules:36 The line takes no effect, ignoring.
Nov 22 04:57:35 systemd-udevd[193]: /usr/lib/udev/rules.d/50-udev-default.rules:37 The line takes no effect, ignoring.
Nov 22 04:57:35 systemd-udevd[193]: /usr/lib/udev/rules.d/50-udev-default.rules:50 The line takes no effect, ignoring.
Nov 22 04:57:35 systemd-udevd[193]: /usr/lib/udev/rules.d/50-udev-default.rules:51 The line takes no effect, ignoring.
Nov 22 04:57:35 systemd-udevd[193]: /usr/lib/udev/rules.d/50-udev-default.rules:52 The line takes no effect, ignoring.
Nov 22 04:57:35 systemd-udevd[193]: /usr/lib/udev/rules.d/50-udev-default.rules:53 The line takes no effect, ignoring.
Nov 22 04:57:35 systemd-udevd[193]: /usr/lib/udev/rules.d/50-udev-default.rules:55 The line takes no effect, ignoring.
Nov 22 04:57:35 systemd-udevd[193]: /usr/lib/udev/rules.d/50-udev-default.rules:56 The line takes no effect, ignoring.
Nov 22 04:57:35 systemd-udevd[193]: /usr/lib/udev/rules.d/50-udev-default.rules:57 The line takes no effect, ignoring.
Nov 22 04:57:35 systemd-udevd[193]: /usr/lib/udev/rules.d/50-udev-default.rules:58 The line takes no effect, ignoring.
Nov 22 04:57:35 systemd-udevd[193]: /usr/lib/udev/rules.d/50-udev-default.rules:59 The line takes no effect, ignoring.
Nov 22 04:57:35 systemd-udevd[193]: /usr/lib/udev/rules.d/50-udev-default.rules:60 The line takes no effect, ignoring.
Nov 22 04:57:35 systemd-udevd[193]: /usr/lib/udev/rules.d/50-udev-default.rules:62 The line takes no effect, ignoring.
Nov 22 04:57:35 systemd-udevd[193]: /usr/lib/udev/rules.d/50-udev-default.rules:63 The line takes no effect, ignoring.
Nov 22 04:57:35 systemd-udevd[193]: /usr/lib/udev/rules.d/50-udev-default.rules:64 The line takes no effect, ignoring.
Nov 22 04:57:35 systemd-udevd[193]: /usr/lib/udev/rules.d/50-udev-default.rules:65 The line takes no effect, ignoring.
Nov 22 04:57:35 systemd-udevd[193]: /usr/lib/udev/rules.d/50-udev-default.rules:66 The line takes no effect, ignoring.
Nov 22 04:57:35 systemd-udevd[193]: /usr/lib/udev/rules.d/50-udev-default.rules:67 The line takes no effect, ignoring.
Nov 22 04:57:35 systemd-udevd[193]: /usr/lib/udev/rules.d/50-udev-default.rules:69 The line takes no effect, ignoring.
Nov 22 04:57:35 systemd-udevd[193]: /usr/lib/udev/rules.d/50-udev-default.rules:70 The line takes no effect, ignoring.
Nov 22 04:57:35 systemd-udevd[193]: /usr/lib/udev/rules.d/50-udev-default.rules:71 The line takes no effect, ignoring.
Nov 22 04:57:35 systemd-udevd[193]: /usr/lib/udev/rules.d/50-udev-default.rules:73 The line takes no effect, ignoring.
Nov 22 04:57:35 systemd-udevd[193]: /usr/lib/udev/rules.d/50-udev-default.rules:74 The line takes no effect, ignoring.
Nov 22 04:57:35 systemd-udevd[193]: /usr/lib/udev/rules.d/50-udev-default.rules:75 The line takes no effect, ignoring.
Nov 22 04:57:35 systemd-udevd[193]: /usr/lib/udev/rules.d/50-udev-default.rules:87 The line takes no effect, ignoring.
Nov 22 04:57:43 systemd[1]: Stopping udev Kernel Device Manager...
Nov 22 04:57:43 systemd[1]: systemd-udevd.service: Succeeded.
Nov 22 04:57:43 systemd[1]: Stopped udev Kernel Device Manager.
Nov 22 04:57:44 systemd-udevd[479]: /usr/lib/udev/rules.d/11-dm-lvm.rules:40 Invalid value for OPTIONS key, ignoring: 'event_timeout=180'
Nov 22 04:57:44 systemd-udevd[479]: /usr/lib/udev/rules.d/11-dm-lvm.rules:40 The line takes no effect, ignoring.
Nov 22 04:57:44 systemd[1]: Started udev Kernel Device Manager.
Nov 22 04:57:44 systemd[1]: Starting Network Service...
Nov 22 04:57:45 mtp-probe[507]: checking bus 1, device 2: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-5"
Nov 22 04:57:45 mtp-probe[507]: bus: 1, device: 2 was not an MTP device
Nov 22 04:57:45 mtp-probe[506]: checking bus 1, device 4: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-8"
Nov 22 04:57:45 mtp-probe[506]: bus: 1, device: 4 was not an MTP device
Nov 22 04:57:45 mtp-probe[509]: checking bus 1, device 5: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-9"
Nov 22 04:57:45 mtp-probe[509]: bus: 1, device: 5 was not an MTP device
Nov 22 04:57:45 systemd-networkd[486]: Enumeration completed
Nov 22 04:57:45 systemd[1]: Started Network Service.
Nov 22 04:57:45 systemd-udevd[504]: ethtool: autonegotiation is unset or enabled, the speed and duplex are not writable.
Nov 22 04:57:45 systemd[1]: Starting Wireless service...
Nov 22 04:57:46 iwd[628]: Wireless daemon version 1.1
Nov 22 04:57:46 iwd[628]: Loaded configuration from /etc/iwd/main.conf
Nov 22 04:57:46 systemd[1]: Started Wireless service.
Nov 22 04:57:46 iwd[628]: netconfig: Network configuration is disabled.
Nov 22 04:57:46 systemd-udevd[481]: Using default interface naming scheme 'v243'.
Nov 22 04:57:46 iwd[628]: Wiphy phy0 will only use the default interface
Nov 22 04:57:46 iwd[628]: Wiphy: 0, Name: phy0
Nov 22 04:57:46 iwd[628]:         Permanent Address: ee:ee:ee:ee:ee:ee
Nov 22 04:57:46 iwd[628]:         Bands: 2.4 GHz 5 GHz
Nov 22 04:57:46 iwd[628]:         Ciphers: CCMP TKIP BIP
Nov 22 04:57:46 iwd[628]:         Supported iftypes: ad-hoc station ap p2p-client p2p-go p2p-device
Nov 22 04:57:46 systemd-udevd[504]: Using default interface naming scheme 'v243'.
Nov 22 04:57:46 systemd-udevd[504]: ethtool: autonegotiation is unset or enabled, the speed and duplex are not writable.
Nov 22 04:57:46 systemd-networkd[486]: eth0: Interface name change detected, eth0 has been renamed to enp0s31f6.
Nov 22 04:57:46 systemd-udevd[481]: ethtool: autonegotiation is unset or enabled, the speed and duplex are not writable.
Nov 22 04:57:46 systemd-udevd[481]: wlan0: Failed to rename network interface 2 from 'wlan0' to 'wlp4s0': Device or resource busy
Nov 22 04:57:46 systemd-udevd[481]: wlan0: Failed to process device, ignoring: Device or resource busy
Nov 22 04:57:46 systemd-networkd[486]: wlan0: IPv6 successfully enabled
Nov 22 04:57:46 systemd-networkd[486]: wlan0: DHCP4 CLIENT: Failed to set IAID+DUID: Device or resource busy
Nov 22 04:57:46 systemd-networkd[486]: wlan0: Failed
Nov 22 04:57:46 systemd-udevd[490]: Using default interface naming scheme 'v243'.
Nov 22 04:57:46 systemd-networkd[486]: enp0s31f6: IPv6 successfully enabled
Nov 22 04:57:46 systemd-networkd[486]: wlan0: Gained carrier
Nov 22 04:57:53 systemd-networkd[486]: enp0s31f6: Gained carrier
Nov 22 04:57:53 systemd-networkd[486]: enp0s31f6: DHCPv4 address 192.168.19.14/24 via 192.168.19.1
Nov 22 04:57:54 systemd-networkd[486]: enp0s31f6: Gained IPv6LL

Wieso startet iwd vor systemd-networkd? Es ist doch per override explizit verboten! Ich habe die override.conf noch ergänzt:

# /etc/systemd/system/iwd.service.d/override.conf
[Unit]
After=systemd-udevd.service systemd-networkd.service sys-subsystem-net-devices-wlp4s0.device

Mal sehen, wie es damit klappt. Hat jemand Ideen oder sachdienliche Hinweise?

Beitrag geändert von segfault (23.11.2019 08:09:33)

Offline

#2 23.11.2019 18:50:47

wirr
Mitglied

Re: iwd + systemd-networkd: iwd startet (manchmal) zu zeitig

Ist das nicht ein Wiederspruch:

Before=network.target
Wants=network.target

Offline

#3 23.11.2019 20:27:30

blub
Gast

Re: iwd + systemd-networkd: iwd startet (manchmal) zu zeitig

Nein, ist kein Widerspruch. Zudem ist es genau so auch upstream bei iwd konfiguriert.

Leider kann ich zum eigentlichen Problem auch keine Hilfe anbieten, dein Override ist eigentlich die empfohlene Lösung.

Schnellantwort auf dieses Thema

Schreibe deinen Beitrag und versende ihn
Deine Antwort

Fußzeile des Forums