On Tue, May 22, 2018 at 03:23:47PM +0200, Benjamin Drung wrote: > > Also, IMHO, the networking.service above is wrong. It should not > > attempt to do udevadm settle internally, but it must depend on > > systemd-udev-settle.service. I'm still a little puzzled here, as ipoib should have been started really, really early on, early enough to get ordered. Can you check the boot log dmesgs to see when the banner for plugging in the mlx4 IB device is printed? I fear that is being done after the initrd is finished with MOFED. > > The reason is due to how systemd scheduals ordering. Once it starts > > running networking.service 'ExecStartPre' it will not re-consider > > order past that point. So any activations done by udev while settling > > have no impact on networking.service at all. > > > > Having it depend on systemd-udev-settle.service means it gets to > > recheck ordering after settle is done, but before starting > > networking.sevice - which is the behavior it is really trying to get. > > > > That may be a big part of this bug, go back to doing: > > > > After=systemd-udev-settle.service > > Requires=systemd-udev-settle.service > > You are right. I modified networking.service accordingly and it works > as expected now. I send a patch for ifupdown to Debian, but a > discussion about the fix started: https://bugs.debian.org/899002 That bug discussion has taken a strange turn.. Firstly, the entire point of 'udev adm settle' is to create compatibility with non-hotplug aware things like ifupdown by synchronizing the cold plug of all the boot devices. So it is wrong to say that this is somehow the fault of the rdma scripts - they should work correctly with the settle mechanism. I can understand the ifupdown not wanting to always depend on settle, but their really is no choice. If thier scripts don't support hot plug then they have to settle before running them or lots of stuff just won't work right. I think the compromise for them should be to keep the settle as optional, but implement it correctly. Something like this helper service: ifupdown-pre.service: [Unit] Description=Helper to synchronize boot up for ifupdown Wants=network.target After=local-fs.target network-pre.target apparmor.service systemd-sysctl.service systemd-modules-load.service Before=network.target shutdown.target network-online.target Conflicts=shutdown.target [Service] Type=oneshot ExectStart=/bin/sh -c '[ "$CONFIGURE_INTERFACES" != "no" ] && systemctl start systemd-udev-settle.service They could compromize and put the optional settled they already have in their own script (like Then change networking.service to have: # Launch the oneshot to conditionally start ssytemd-udev-settle.service before starting this Requires=ifupdown-pre.service After=ifupdown-pre.service # If it did lauch systemd-udev-settle.service then wait for it before starting After=systemd-udev-settle.service And obviously drop the wrong ExecStartPre from networking.service. Jason -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html