I switched to systemd-networkd.service which works as intended:
erlangen:~ # journalctl -b -u systemd-networkd.service
-- Logs begin at Mon 2019-02-11 16:20:00 CET, end at Tue 2019-03-19 20:31:47 CET. --
Mar 19 18:20:33 erlangen systemd[1]: Starting Network Service...
Mar 19 18:20:33 erlangen systemd-networkd[543]: Enumeration completed
Mar 19 18:20:33 erlangen systemd[1]: Started Network Service.
Mar 19 18:20:34 erlangen systemd-networkd[543]: wlan0: Interface name change detected, wlan0 has been renamed to wlp3s0.
Mar 19 18:20:34 erlangen systemd-networkd[543]: wlp3s0: Could not bring up interface: Invalid argument
Mar 19 18:20:34 erlangen systemd-networkd[543]: eth0: Interface name change detected, eth0 has been renamed to enp0s31f6.
Mar 19 18:20:34 erlangen systemd-networkd[543]: enp0s31f6: Could not bring up interface: Invalid argument
Mar 19 18:20:36 erlangen systemd-networkd[543]: enp0s31f6: Gained carrier
Mar 19 18:20:36 erlangen systemd-networkd[543]: wlp3s0: Gained carrier
Mar 19 18:20:37 erlangen systemd-networkd[543]: wlp3s0: Gained IPv6LL
Mar 19 18:20:38 erlangen systemd-networkd[543]: enp0s31f6: Gained IPv6LL
Mar 19 18:20:39 erlangen systemd-networkd[543]: enp0s31f6: Configured
Mar 19 18:20:39 erlangen systemd-networkd[543]: wlp3s0: Configured
erlangen:~ #
Configuration of the links being slow, some units will fail due to missing internet connection. Thus I modified them as follows:
erlangen:~ # cat /etc/systemd/system/minidlna.service.d/online.conf
[Unit]
Requires=network-online.target
After=network-online.target
erlangen:~ #
The above works as intended and the unit will start only when links are ready. However it has an unexpected side effect on login:
erlangen:~ # journalctl -b -7 -u init.scope -o short-monotonic|grep Started|grep -i login
5.061921] erlangen systemd[1]: Started Generate issue file for login session.
5.078849] erlangen systemd[1]: Started Login and scanning of iSCSI devices.
5.657736] erlangen systemd[1]: Started Login Service.
erlangen:~ #
erlangen:~ # journalctl -b -u init.scope -o short-monotonic|grep Started|grep -i login
5.124649] erlangen systemd[1]: Started Generate issue file for login session.
5.617437] erlangen systemd[1]: Started Login Service.
** 9.432681**] erlangen systemd[1]: Started Login and scanning of iSCSI devices.
erlangen:~ #
Login is delayed considerably. Any idea how to fix this?
So iSCSI connection now waits for network to be up. Where is the problem? How do you expect iSCSI to connect to server if network is not available?
I checked for units:
erlangen:~ # systemctl list-unit-files *scsi*
UNIT FILE STATE
iscsi.service enabled
iscsid.service disabled
iscsiuio.service disabled
iscsid.socket enabled
iscsiuio.socket disabled
5 unit files listed.
erlangen:~ #
Many thanks for pointing to the obvious! :shame:
Ran zypper rm iscsiuio libo*****csiusr0_2_0 open-iscsi yast2-iscsi-client, reinstalled bootmanager and rebooted:
erlangen:~ # journalctl -b 0 -u init.scope -o short-monotonic|grep Started|grep -i login
5.051244] erlangen systemd[1]: Started Generate issue file for login session.
5.676893] erlangen systemd[1]: Started Login Service.
erlangen:~ #
erlangen:~ # systemd-analyze
Startup finished in 1.844s (kernel) + 1.315s (initrd) + 12.167s (userspace) = 15.327s
graphical.target reached after 12.116s in userspace
erlangen:~ #
Login now is possible before graphical target is reached:
erlangen:~ # journalctl -b -o short-monotonic -u user@475.service
-- Logs begin at Mon 2019-02-11 16:20:00 CET, end at Wed 2019-03-20 11:02:04 CET. --
6.447411] erlangen systemd[1]: Starting User Manager for UID 475...
6.453678] erlangen systemd[1326]: pam_unix(systemd-user:session): session opened for user sddm by (uid=0)
6.620554] erlangen systemd[1326]: Reached target Paths.
6.620796] erlangen systemd[1326]: Reached target Timers.
6.620994] erlangen systemd[1326]: Starting D-Bus User Message Bus Socket.
6.635517] erlangen systemd[1326]: Listening on D-Bus User Message Bus Socket.
6.635581] erlangen systemd[1326]: Reached target Sockets.
6.635628] erlangen systemd[1326]: Reached target Basic System.
6.635673] erlangen systemd[1326]: Reached target Default.
6.635717] erlangen systemd[1326]: Startup finished in 164ms.
6.635766] erlangen systemd[1]: Started User Manager for UID 475.
6.711961] erlangen systemd[1326]: Started D-Bus User Message Bus.
...
erlangen:~ #
erlangen:~ # systemd-analyze blame
11.230s systemd-networkd-wait-online.service
1.608s apparmor.service
799ms udisks2.service
732ms plymouth-quit-wait.service
731ms postfix.service
656ms systemd-logind.service
645ms display-manager.service
466ms minidlna.service
393ms dev-nvme0n1p2.device
328ms initrd-switch-root.service
265ms plymouth-switch-root.service
194ms initrd-parse-etc.service
165ms systemd-vconsole-setup.service
128ms [EMAIL="user@1000.servic"]user@1000.servic[/EMAIL]e
113ms systemd-udev-trigger.service
102ms home\x2dHDD.mount
89ms apache2.service
79ms systemd-journal-flush.service
68ms systemd-udevd.service
63ms systemd-tmpfiles-clean.service
59ms home\x2dSSD.mount
54ms upower.service
51ms dev-disk-by\x2duuid-699eabfd\x2d107e\x2d488a\x2d9d9d\x2d9e5a280084bd.swap
50ms systemd-networkd.service
50ms kbdsettings.service
50ms polkit.service
47ms Tumbleweed\x2dSSD.mount
47ms systemd-rfkill.service
46ms boot-efi.mount
46ms home.mount
45ms ntpd.service
43ms systemd-tmpfiles-setup.service
40ms systemd-update-utmp-runlevel.service
39ms [EMAIL="wpa_supplicant@wlp3s0.servic"]wpa_supplicant@wlp3s0.servic[/EMAIL]e
...
erlangen:~ #
erlangen:~ # systemd-analyze critical-chain
The time after the unit is active or started is printed after the "@" character.
The time the unit takes to start is printed after the "+" character.
graphical.target @12.116s
└─multi-user.target @12.116s
└─minidlna.service @11.650s +466ms
└─network-online.target @11.649s
└─systemd-networkd-wait-online.service @418ms +11.230s
└─**systemd-networkd.service @367ms +50ms**
└─systemd-udevd.service @297ms +68ms
└─systemd-tmpfiles-setup-dev.service @264ms +31ms
└─kmod-static-nodes.service @243ms +2ms
└─systemd-journald.socket
└─system.slice
└─-.slice
erlangen:~ #
zypper rm gets censored, should read libo** p e n i s **csius
minidlna waits for interface when booting, but goes ahead upon wake up:
erlangen:~ # grep wlp3s0 /var/log/minidlna/minidlna.log|grep 2019/03/22
[2019/03/22 05:20:18] getifaddr.c:109: error: Network interface wlp3s0 not found
[2019/03/22 06:11:06] minidlnaconfig: Configured network interface wlp3s0 found.
[2019/03/22 07:18:02] getifaddr.c:109: error: Network interface wlp3s0 not found
[2019/03/22 07:22:55] minidlnaconfig: Configured network interface wlp3s0 found.
erlangen:~ #
Any idea how to fix this?