From 1a4ab425a90da3ce7f0991021537d5a85d078481 Mon Sep 17 00:00:00 2001 From: Carolina Jubran Date: Tue, 2 Jul 2024 10:14:37 +0300 Subject: [PATCH] kernel-boot: Adjust rdma-load-modules@.service MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit rdma-load-modules@.service run in the initrd. However, it gets terminated when initrd-cleanup.service isolates for initrd-switch-root.target. The termination can occur in the middle of the IPoIB initialization, leading to a failure to load netdevices. Include 'Before=initrd.target' to ensure that the services are not being killed when initrd-cleanup.service isolates to initrd-switch-root.target. Kernel log: workqueue: Failed to create a rescuer kthread for wq "ipoib_wq": -EINTR Cleaning Up and Shutting Down Daemons ib0: failed to allocate device WQ mlx5_0: failed to initialize device: ib0 port 1 (ret = -12) mlx5_0: couldn't register ipoib port 1; error -12 workqueue: Failed to create a rescuer kthread for wq "mlx5e": -EINTR ibp6s0f1, 1: ipoib_intf_alloc failed -12 workqueue: Failed to create a rescuer kthread for wq "mlx5e": -EINTR ibp6s0f2, 1: ipoib_intf_alloc failed -12 workqueue: Failed to create a rescuer kthread for wq "mlx5e": -EINTR ibp6s0f3, 1: ipoib_intf_alloc failed -12 Stopped Load RDMA modules …/rdma/modules/infiniband.conf Stopped Load RDMA modules …m /etc/rdma/modules/rdma.conf Fixes: 2f4fb9fc59a8 ("Common infrastructure for auto loading rdma modules") Signed-off-by: Carolina Jubran --- kernel-boot/rdma-load-modules@.service.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel-boot/rdma-load-modules@.service.in b/kernel-boot/rdma-load-modules@.service.in index c390a8cc2..773f6237d 100644 --- a/kernel-boot/rdma-load-modules@.service.in +++ b/kernel-boot/rdma-load-modules@.service.in @@ -5,6 +5,9 @@ Documentation=file:@CMAKE_INSTALL_FULL_DOCDIR@/udev.md # systemd-modules-load.service DefaultDependencies=no Before=sysinit.target +# Kernel modules must load in initrd before initrd.target to avoid being killed +# when initrd-cleanup.service isolates to initrd-switch-root.target. +Before=initrd.target # Do not execute concurrently with an ongoing shutdown Conflicts=shutdown.target Before=shutdown.target