Whamcloud - gitweb
LU-2456 lnet: configure lnet on startup 98/11798/11
authorAmir Shehata <amir.shehata@intel.com>
Fri, 5 Sep 2014 18:48:15 +0000 (11:48 -0700)
committerAndreas Dilger <andreas.dilger@intel.com>
Wed, 22 Oct 2014 05:08:49 +0000 (05:08 +0000)
This is the ninth patch of a set of patches that enables DLC.

Modified lustre/scripts/lnet to look for a default config file
/etc/sysconfig/lnet.conf.  If it's found and the lnetctl utility
is installed, then call lnetctl with that file as a parameter.

This file is expected to be in YAML format and it defines
LNET configuration items.

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: I32252abfddeaefd43359c7055a5476b2bc8eda92
Reviewed-on: http://review.whamcloud.com/11798
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Andreas Dilger <andreas.dilger@intel.com>
lustre/scripts/lnet

index af08125..b02c74a 100644 (file)
@@ -174,6 +174,8 @@ status ()
 }
 
 LUSTRE_ROUTES_CONFIG_FILE="/etc/sysconfig/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
@@ -189,6 +191,12 @@ case "$1" in
        elif [ -f "$LUSTRE_ROUTES_CONFIG_FILE" ]; then
                lustre_routes_config $LUSTRE_ROUTES_CONFIG_FILE
        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 [ -f $LUSTRE_LNET_CONFIG_UTILITY ] && [ -f "$LUSTRE_LNET_CONFIG_FILE" ]; then
+               $LUSTRE_LNET_CONFIG_UTILITY $LUSTRE_LNET_CONFIG_FILE
+       fi
        run_postexec_check "start"
        ;;
   stop)