Am Donnerstag, den 24.05.2018, 10:40 +0200 schrieb Michael Biebl:
> Am 24.05.2018 um 10:28 schrieb Benjamin Drung:
> > Am Dienstag, den 22.05.2018, 12:36 +0200 schrieb Michael Biebl:
> > > Am 22.05.2018 um 12:27 schrieb Benjamin Drung:
> > > > networking.service calls 'udevadm
> > > > settle' in 'ExecStartPre'.
> > > 
> > > It does, indeed. But not unconditionally.
> > > 
> > > ifupdown is basically installed on every system, even if e.g.
> > > NetworkManager is actually in charge and /e/n/i is empty.
> > > 
> > > This would mean you unconditionally pull in systemd-udev-
> > > settle.service
> > > on basically every system out there, and we certainly don't want
> > > that.
> > > systemd-udev-settle.service is a hack.
> > 
> > Attached is an updated and tested patch that splits the udevadm
> > settle
> > command into a separate ifupdown-pre service without modifying the
> > logic. So a no-op 'udevadm settle' will stay a no-op.
> 
> I don't see how this is going to fix this issue. Can you please
> elaborate?
> My guess is that this patch simply changes the timinig a little so
> you
> less likely hit the race condition.

The current behavior is that systemd starts the networking.service
which runs 'udevadm settle' in ExecStartPre. While 'udevadm settle' is
running, udev triggers (independently) the rdma-load-modules@infiniband
.service which loads the ib_ipoib kernel modules. 'udevadm settle'
exits while the kernel is still loading/initializing the ib_ipoib
kernel modules. rdma-load-modules@infiniband.service declares that it
should run before networking.service, but this has no effect because
networking.service is already running (i.e. executing the ExecStartPre
command). Then the networking.service starts ifup which will fail. 

The fixed version does following: systemd starts the ifupdown-
pre.service which runs 'udevadm settle'. While 'udevadm settle' is
running, udev triggers (independently) the rdma-load-modules@infiniband
.service which loads the ib_ipoib kernel modules. rdma-load-modules@inf
iniband.service declares that it should run before networking.service
and it is ordered before the networking.service. 'udevadm settle' exits
and ifupdown-pre.service finishes, but rdma-load-modu...@infiniband.ser
vice is still running and networking.service is waiting for it. Once
ib_ipoib is loaded and initialized, rdma-load-modules@infiniband.servic
e finishes and networking.service starts.

-- 
Benjamin Drung
System Developer
Debian & Ubuntu Developer

ProfitBricks GmbH
Greifswalder Str. 207
10405 Berlin

Email: benjamin.dr...@profitbricks.com
URL: https://www.profitbricks.de

Sitz der Gesellschaft: Berlin
Registergericht: Amtsgericht Charlottenburg, HRB 125506 B
Geschäftsführer: Achim Weiss, Matthias Steinberg, Christoph Steffens

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to