From: Amir Shehata Date: Fri, 5 Sep 2014 18:48:15 +0000 (-0700) Subject: LU-2456 lnet: configure lnet on startup X-Git-Tag: 2.6.90~80 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=92b72b7ac85c258f47d6d8f157909a19bd4b724e;p=fs%2Flustre-release.git LU-2456 lnet: configure lnet on startup 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 Change-Id: I32252abfddeaefd43359c7055a5476b2bc8eda92 Reviewed-on: http://review.whamcloud.com/11798 Tested-by: Jenkins Reviewed-by: Andreas Dilger Reviewed-by: James Simmons Tested-by: Andreas Dilger --- diff --git a/lustre/scripts/lnet b/lustre/scripts/lnet index af08125..b02c74a 100644 --- a/lustre/scripts/lnet +++ b/lustre/scripts/lnet @@ -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)