Bug#899002: systemd: networking and rdma-load-modules at infiniband service run in parallel despite the declared dependency order

Benjamin Drung benjamin.drung at profitbricks.com
Fri May 18 18:22:49 BST 2018


Am Freitag, den 18.05.2018, 13:14 -0400 schrieb Felipe Sateler:
> Control: tags -1 moreinfo
> On Fri, May 18, 2018 at 8:57 AM Benjamin Drung <benjamin.drung at profit
> bricks.com> wrote:
> > Package: systemd
> > Version: 232-25+deb9u3
> > Severity: normal
> > 
> > Hi,
> > 
> > rdma-load-modules at infiniband.service (from rdma-core) loads the
> > ib_ipoib
> > (IP over InfiniBand) kernel module. Once this module is loaded,
> > ifup can
> > bring up network devices on InfiniBand. systemd is configured to
> > runs
> > networking.service after network-pre.target which comes after
> > rdma-load-modules at infiniband.service:
> > 
> > ```
> > $ systemctl cat networking.service
> > # /lib/systemd/system/networking.service
> > [Unit]
> > Description=Raise network interfaces
> > Documentation=man:interfaces(5)
> > DefaultDependencies=no
> > 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
> > 
> > [Install]
> > WantedBy=multi-user.target
> > WantedBy=network-online.target
> > 
> > [Service]
> > Type=oneshot
> > EnvironmentFile=-/etc/default/networking
> > ExecStartPre=-/bin/sh -c '[ "$CONFIGURE_INTERFACES" != "no" ] && [
> > -n "$(ifquery --read-environment --list --exclude=lo)" ] && udevadm
> > settle'
> > ExecStart=/sbin/ifup -a --read-environment
> > ExecStop=/sbin/ifdown -a --read-environment --exclude=lo
> > RemainAfterExit=true
> > TimeoutStartSec=5min
> > 
> > $ systemctl cat rdma-load-modules at infiniband.service
> > # /lib/systemd/system/rdma-load-modules at .service
> > [Unit]
> > Description=Load RDMA modules from /etc/rdma/modules/%I.conf
> > Documentation=file:/usr/share/doc/rdma-core/udev.md
> > # Kernel module loading must take place before sysinit.target,
> > similar
> > # to
> > # systemd-modules-load.service
> > DefaultDependencies=no
> > Before=sysinit.target
> > # Do not execute concurrently with an ongoing shutdown
> > Conflicts=shutdown.target
> > Before=shutdown.target
> > # Partially support distro network setup scripts that run after
> > # systemd-modules-load.service but before sysinit.target, eg a
> > classic
> > # network
> > # setup script. Run them after modules have loaded.
> > Wants=network-pre.target
> > Before=network-pre.target
> > # Orders all kernel module startup before rdma-hw.target can become
> > # ready
> > Before=rdma-hw.target
> > 
> > ConditionCapability=CAP_SYS_MODULE
> > 
> > [Service]
> > Type=oneshot
> > RemainAfterExit=yes
> > ExecStart=/lib/systemd/systemd-modules-load
> > /etc/rdma/modules/%I.conf
> > TimeoutSec=90s
> > ```
> 
> How is this service pulled into the boot transaction? Ordering
> dependencies only take effect if all involved units are started at
> the same time. This means the ordering relationship is ignored if
> networking.service is already activating by the time rdma-load-module
> s at infiniband.service pulled into the boot transaction.
> 
> Seems like a misconfiguration issue to me.

The udev rules in rdma-ulp-modules.rules pull in
rdma-load-modules at infiniband.service:

```
TAG+="systemd", ENV{SYSTEMD_WANTS}+="rdma-hw.target"
TAG+="systemd", ENV{ID_RDMA_INFINIBAND}=="1", ENV{SYSTEMD_WANTS}+="rdma-load-modules at infiniband.service"
```

-- 
Benjamin Drung
System Developer
Debian & Ubuntu Developer

ProfitBricks GmbH
Greifswalder Str. 207
10405 Berlin

Email: benjamin.drung at 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




More information about the Pkg-systemd-maintainers mailing list