%{_datadir}/lustre
%{_sysconfdir}/udev/rules.d/99-lustre.rules
%config(noreplace) %{_sysconfdir}/ldev.conf
+%if %{with lnet_dlc}
+%config(noreplace) %{_sysconfdir}/lnet.conf
+%endif
%config(noreplace) %{_sysconfdir}/modprobe.d/ko2iblnd.conf
%if %{with lustre_utils}
%config(noreplace) %{_sysconfdir}/lnet_routes.conf
EXTRA_DIST = lustre.dtd slapd-lustre.conf lustre2ldif.xsl top.ldif \
99-lustre.rules lustre ldev.conf ko2iblnd.conf lsvcgss \
- lnet_routes.conf
+ lnet_routes.conf lnet.conf
ldapconfdir = $(sysconfdir)/openldap
sysconf_DATA = ldev.conf
endif
endif
+if BUILD_DLC
+sysconf_DATA += lnet.conf
+endif
+
modprobedir = $(sysconfdir)/modprobe.d
modprobe_DATA = ko2iblnd.conf
--- /dev/null
+# lnet.conf - configuration file for lnet routes to be imported by lnetctl
+#
+# This configuration file is formatted as YAML and can be imported
+# by lnetctl.
+#
+# net:
+# - net type: o2ib1
+# local NI(s):
+# - nid: 172.16.1.4@o2ib1
+# interfaces:
+# 0: ib0
+# tunables:
+# peer_timeout: 180
+# peer_credits: 128
+# peer_buffer_credits: 0
+# credits: 1024
+# lnd tunables:
+# peercredits_hiw: 64
+# map_on_demand: 32
+# concurrent_sends: 256
+# fmr_pool_size: 2048
+# fmr_flush_trigger: 512
+# fmr_cache: 1
+# CPT: "[0,1]"
+# - nid: 172.16.2.4@o2ib1
+# interfaces:
+# 0: ib1
+# tunables:
+# peer_timeout: 180
+# peer_credits: 128
+# peer_buffer_credits: 0
+# credits: 1024
+# lnd tunables:
+# peercredits_hiw: 64
+# map_on_demand: 32
+# concurrent_sends: 256
+# fmr_pool_size: 2048
+# fmr_flush_trigger: 512
+# fmr_cache: 1
+# CPT: "[0,1]"
+# route:
+# - net: o2ib
+# gateway: 172.16.1.1@o2ib1
+# hop: -1
+# priority: 0
+# peer:
+# - primary nid: 192.168.1.2@o2ib
+# Multi-Rail: True
+# peer ni:
+# - nid: 192.168.1.2@o2ib
+# - nid: 192.168.2.2@o2ib
+# - primary nid: 172.16.1.1@o2ib1
+# Multi-Rail: True
+# peer ni:
+# - nid: 172.16.1.1@o2ib1
+# - nid: 172.16.2.1@o2ib1
#
# These are scripts that are generated from .in files
-genscripts = lc_modprobe lc_net lc_hb lc_cluman lc_md lc_lvm lustre_start
+genscripts = lc_modprobe lc_net lc_hb lc_cluman lc_md lc_lvm lustre_start lnet
SUBDIRS = systemd
EXTRA_DIST = license-status lustre_rmmod ldev lc_mon lhbadm \
lc_servip lustre_routes_config lustre_routes_conversion \
$(addsuffix .in,$(genscripts)) lfs_migrate lustre_req_history \
- lustre lnet lsvcgss lc_common haconfig Lustre.ha_v2 dkms.mkconf \
+ lustre lsvcgss lc_common haconfig Lustre.ha_v2 dkms.mkconf \
zfsobj2fid ko2iblnd-probe
CLEANFILES = $(genscripts)
$(genscripts): %: %.in
- sed -e 's#@scriptlibdir@#$(scriptlibdir)#' < $< > $@
+if BUILD_DLC
+ sed -e 's,@sysconfdir\@,$(sysconfdir),g' \
+ -e 's,@scriptlibdir\@,$(scriptlibdir),g' \
+ -e 's,@BUILD_DLC_TRUE\@,,g' \
+ -e 's,@BUILD_DLC_FALSE\@,\#,g' $< > $@
+else
+ sed -e 's,@sysconfdir\@,$(sysconfdir),g' \
+ -e 's,@scriptlibdir\@,$(scriptlibdir),g' \
+ -e 's,@BUILD_DLC_TRUE\@,\#,g' \
+ -e 's,@BUILD_DLC_FALSE\@,,g' $< > $@
+endif
chmod +x $@
eval $old_nullglob
}
-LUSTRE_ROUTES_CONFIG_FILE="/etc/lnet_routes.conf"
-LUSTRE_LNET_CONFIG_FILE="/etc/sysconfig/lnet.conf"
-LUSTRE_LNET_CONFIG_UTILITY="/usr/sbin/lnetctl"
-
# See how we were called.
case "$1" in
start)
run_preexec_check "start"
touch /var/lock/subsys/lnet
modprobe lnet || exit 1
- # if lnet.conf file exists then use lnetctl lnet configure, since
- # that doesn't load the networks and routes defined in the mod
- # params. The appropriate configuration will be picked up from
- # the lnet.conf YAML file.
- if [ -x $LUSTRE_LNET_CONFIG_UTILITY -a -f "$LUSTRE_LNET_CONFIG_FILE" ]; then
- $LUSTRE_LNET_CONFIG_UTILITY lnet configure || exit 1
- else
- lctl network up || exit 1
- fi
- # if an lnet.conf file exists then pass that to the lnetctl
- # utility for parsing. This will configure the items defined
- # in YAML format in the config file.
- if [ -x $LUSTRE_LNET_CONFIG_UTILITY -a -f "$LUSTRE_LNET_CONFIG_FILE" ]; then
- $LUSTRE_LNET_CONFIG_UTILITY import < $LUSTRE_LNET_CONFIG_FILE
- fi
- # if a routes config file is given then use it to configure the
- # routes if not then default to LUSTRE_ROUTES_CONFIG_FILE
- if [ -f "$2" ]; then
- lustre_routes_config $2
- elif [ -f "$LUSTRE_ROUTES_CONFIG_FILE" ]; then
- lustre_routes_config $LUSTRE_ROUTES_CONFIG_FILE
- fi
+ @BUILD_DLC_TRUE@lnetctl lnet configure || exit 1
+ @BUILD_DLC_TRUE@lnetctl import < "@sysconfdir@/lnet.conf"
+ @BUILD_DLC_FALSE@lctl network up || exit 1
+ @BUILD_DLC_FALSE@lustre_routes_config "@sysconfdir@/lnet_routes.conf"
run_postexec_check "start"
;;
stop)
run_preexec_check "stop"
lustre_rmmod ptlrpc || exit 1
- lctl network down || exit 1
+ @BUILD_DLC_TRUE@lnetctl lnet unconfigure || exit 1
+ @BUILD_DLC_FALSE@lctl network down || exit 1
lustre_rmmod libcfs ldiskfs || exit 1
rm -f /var/lock/subsys/lnet
run_postexec_check "stop"
# These are scripts that are generated from .in files
genunitfiles = lnet.service
-sysconfigdir = $(sysconfdir)/sysconfig
if HAVE_SYSTEMD
systemdsystemunit_DATA = lnet.service
$(genunitfiles): %: %.in
if BUILD_DLC
sed -e 's,@sbindir\@,$(sbindir),g' \
- -e 's,@sysconfigdir\@,$(sysconfigdir),g' \
-e 's,@sysconfdir\@,$(sysconfdir),g' \
-e 's,@BUILD_DLC_TRUE\@,,g' \
-e 's,@BUILD_DLC_FALSE\@,\#,g' $< > $@
else
sed -e 's,@sbindir\@,$(sbindir),g' \
- -e 's,@sysconfigdir\@,$(sysconfigdir),g' \
-e 's,@sysconfdir\@,$(sysconfdir),g' \
-e 's,@BUILD_DLC_TRUE\@,\#,g' \
-e 's,@BUILD_DLC_FALSE\@,,g' $< > $@
@BUILD_DLC_FALSE@ExecStart=@sbindir@/lctl network up
@BUILD_DLC_FALSE@ExecStart=@sbindir@/lustre_routes_config @sysconfdir@/lnet_routes.conf
@BUILD_DLC_TRUE@ExecStart=@sbindir@/lnetctl lnet configure
-@BUILD_DLC_TRUE@ExecStart=@sbindir@/lnetctl import < @sysconfigdir@/lnet.conf
+@BUILD_DLC_TRUE@ExecStart=@sbindir@/lnetctl import < @sysconfdir@/lnet.conf
ExecStop=@sbindir@/lustre_rmmod ptlrpc
@BUILD_DLC_FALSE@ExecStop=@sbindir@/lctl network down
@BUILD_DLC_TRUE@ExecStop=@sbindir@/lnetctl lnet unconfigure