@@ -341,7 +341,7 @@ Description: Examples for the librdmacm library
Package: srptools
Architecture: linux-any
-Depends: lsb-base (>= 3.2-14~), ${misc:Depends}, ${shlibs:Depends}
+Depends: lsb-base (>= 3.2-14~), rdma-core, ${misc:Depends}, ${shlibs:Depends}
Description: Tools for Infiniband attached storage (SRP)
In conjunction with the kernel ib_srp driver, srptools allows you to
discover and use Infiniband attached storage devices which use the
@@ -1,3 +1,4 @@
+etc/rdma/modules/srp_daemon.conf
etc/srp_daemon.conf
lib/systemd/system/srp_daemon.service
lib/systemd/system/srp_daemon_port@.service
@@ -452,6 +452,7 @@ rm -rf %{buildroot}/%{_initrddir}/
%files -n srp_daemon
%config(noreplace) %{_sysconfdir}/srp_daemon.conf
+%config(noreplace) %{_sysconfdir}/rdma/modules/srp_daemon.conf
%{_libexecdir}/srp_daemon/start_on_all_ports
%{_unitdir}/srp_daemon.service
%{_unitdir}/srp_daemon_port@.service
@@ -47,6 +47,10 @@ install(FILES "srp_daemon.rules"
RENAME "60-srp_daemon.rules"
DESTINATION "${CMAKE_INSTALL_UDEV_RULESDIR}")
+install(FILES modules-srp_daemon.conf
+ RENAME "srp_daemon.conf"
+ DESTINATION "${CMAKE_INSTALL_SYSCONFDIR}/rdma/modules")
+
# FIXME: The ib init.d file should really be included in rdma-core as well.
set(RDMA_SERVICE "openibd" CACHE STRING "init.d file service name to order srpd after")
# NOTE: These defaults are for CentOS, packagers should override.
new file mode 100644
@@ -0,0 +1,2 @@
+# These modules are loaded by the system if srp_daemon is to be run
+ib_srp
@@ -1,6 +1,6 @@
[Unit]
Description=Daemon that discovers and logs in to SRP target systems
-Documentation=man:srp_daemon file:/etc/rdma/rdma.conf file:/etc/srp_daemon.conf
+Documentation=man:srp_daemon file:/etc/srp_daemon.conf
DefaultDependencies=false
Conflicts=emergency.target emergency.service
Before=remote-fs-pre.target
@@ -3,7 +3,8 @@ Description=SRP daemon that monitors port %i
Documentation=man:srp_daemon file:/etc/rdma/rdma.conf file:/etc/srp_daemon.conf
DefaultDependencies=false
Conflicts=emergency.target emergency.service
-After=srp_daemon.service sys-subsystem-rdma-devices-%i-umad.device network.target
+Requires=rdma-load-modules@srp_daemon.service
+After=srp_daemon.service rdma-load-modules@srp_daemon.service sys-subsystem-rdma-devices-%i-umad.device network.target
BindsTo=srp_daemon.service sys-subsystem-rdma-devices-%i-umad.device
Before=remote-fs-pre.target
We use the rdma-core module loading infrastructure to load a srp_daemon specific module list before allowing srp_daemon to start. This is in lieu of kernel module auto loading, which is hard to trigger for sysfs based interfaces. Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> --- debian/control | 2 +- debian/srptools.install | 1 + redhat/rdma-core.spec | 1 + srp_daemon/CMakeLists.txt | 4 ++++ srp_daemon/modules-srp_daemon.conf | 2 ++ srp_daemon/srp_daemon.service.in | 2 +- srp_daemon/srp_daemon_port@.service.in | 3 ++- 7 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 srp_daemon/modules-srp_daemon.conf