Package: ifupdown
Version: 0.8.19
Severity: normal
Tags: patch

Hi,

we use ifupdown to configure IPoIB devices. The normal workflow is that
udev loads the kernel modules for InfiniBand and activates
`rdma-load-modules@infiniband.service`, which loads `ib_ipoib`. Then
`networking.service` runs afterwards and configures the IPoIB devices.

We had one system where `networking.service` was started before
`rdma-load-modules@infiniband.service` and therefore failed to configure the
IPoIB devices:

```
$ zgrep --color '\(RDMA\|Reached target\|Raise network\)' /var/log/syslog.1.gz 
| head -n 23
Jun 18 21:50:19 systemd[1]: Started Load RDMA modules from 
/etc/rdma/modules/srp_daemon.conf.
Jun 18 21:50:19 systemd[1]: Reached target Local File Systems (Pre).
Jun 18 21:50:19 systemd[1]: Reached target Local File Systems.
Jun 18 21:50:19 systemd[1]: Reached target System Time Synchronized.
Jun 18 21:50:19 systemd[1]: Reached target System Initialization.
Jun 18 21:50:19 systemd[1]: Reached target Sockets.
Jun 18 21:50:19 systemd[1]: Reached target Basic System.
Jun 18 21:50:19 systemd[1]: Reached target Timers.
Jun 18 21:50:19 systemd[1]: Reached target Network (Pre).
Jun 18 21:50:20 systemd[1]: Starting Raise network interfaces...
Jun 18 21:50:20 systemd[1]: Starting Load RDMA modules from 
/etc/rdma/modules/infiniband.conf...
Jun 18 21:50:20 systemd[1]: Starting Load RDMA modules from 
/etc/rdma/modules/rdma.conf...
Jun 18 21:50:20 systemd[1]: Starting RDMA Node Description Daemon...
Jun 18 21:50:20 systemd[1]: Starting Load RDMA modules from 
/etc/rdma/modules/roce.conf...
Jun 18 21:50:20 systemd[1]: Started RDMA Node Description Daemon.
Jun 18 21:50:20 systemd[1]: Started Load RDMA modules from 
/etc/rdma/modules/roce.conf.
Jun 18 21:50:20 systemd[1]: Started Load RDMA modules from 
/etc/rdma/modules/rdma.conf.
Jun 18 21:50:21 systemd[1]: Started Load RDMA modules from 
/etc/rdma/modules/infiniband.conf.
Jun 18 21:50:21 systemd[1]: Reached target RDMA Hardware.
Jun 18 21:50:21 systemd[1]: Failed to start Raise network interfaces.
Jun 18 21:50:21 systemd[1]: Reached target Network.
Jun 18 21:50:22 systemd[1]: Reached target Network is Online.
Jun 18 21:50:28 systemd[1]: Reached target Login Prompts.
```

`rdma-load-modules@.service` declares to run before `network-pre.target`, but
when udev triggers `rdma-load-modules@infiniband.service`, the
`network-pre.target` is already passed and therefore `networking.service` does
not wait for `rdma-load-modules@infiniband.service` to finish.

So I suggest to let `ifupdown-pre.service` declare to run before
`network-pre.target`. That way it is ensured that
`rdma-load-modules@infiniband.service` is activated before `network-pre.target`
is reached.

As alternative, `rdma-load-modules@.service` could declare to run before
`networking.service` in addition to `networking-pre.target`.

-- 
Benjamin Drung

DevOps Engineer and Debian & Ubuntu Developer
Platform Integration (IONOS Cloud)

1&1 IONOS SE | Greifswalder Str. 207 | 10405 Berlin | Germany
E-mail: benjamin.dr...@cloud.ionos.com | Web: www.ionos.de

Hauptsitz Montabaur, Amtsgericht Montabaur, HRB 24498

Vorstand: Dr. Christian Böing, Hüseyin Dogan, Dr. Martin Endreß, Hans-Henning
Kettler, Arthur Mai, Matthias Steinberg, Achim Weiß
Aufsichtsratsvorsitzender: Markus Kadelke


Member of United Internet

Reply via email to