[ewg] [PATCH] ofed_1_2/ofed_scripts

Scott Weitzenkamp (sweitzen) sweitzen at cisco.com
Thu May 3 10:16:48 PDT 2007


Correct me if I'm wrong, but this still doesn't honor SET_IPOIB_CM from
openibd.conf.  You need to call set_ipoib_cm in openibd on each bond
slave before calling ib-bond.

Scott Weitzenkamp
SQA and Release Manager
Server Virtualization Business Unit
Cisco Systems
 

> -----Original Message-----
> From: ewg-bounces at lists.openfabrics.org 
> [mailto:ewg-bounces at lists.openfabrics.org] On Behalf Of Moni Shoua
> Sent: Thursday, May 03, 2007 8:37 AM
> To: Vladimir Sokolovsky
> Cc: ewg
> Subject: [ewg] [PATCH] ofed_1_2/ofed_scripts
> 
> Fix some issues related to ib-bonding operation
> 1. Don't run ib-bond if ib-bonding is not installd
> 2. Display success/failure information when creating bonding 
> interfaces
> Signed-off-by: Moni Shoua <monis at voltaire.com>
> ---
>  openibd |   17 +++++++++++++----
>  1 files changed, 13 insertions(+), 4 deletions(-)
> 
> diff --git a/ofed_scripts/openibd b/ofed_scripts/openibd
> index 2da4b15..8fbaa69 100755
> --- a/ofed_scripts/openibd
> +++ b/ofed_scripts/openibd
> @@ -1,4 +1,4 @@
> -#!/bin/bash
> +#!/bin/bash 
>  
>  #
>  # Copyright (c) 2006 Mellanox Technologies. All rights reserved.
> @@ -798,7 +798,8 @@ start()
>              ipoib_ha_pid=$!
>              echo ${ipoib_ha_pid} > ${ipoib_ha_pidfile}
>  	elif [ "X${IPOIBBOND_ENABLE}" == "Xyes" ]; then
> -		if [ ! -z $IPOIB_BONDS ]; then
> +		if ( test ! -z $IPOIB_BONDS && which ib-bond 
> &>/dev/null ) ; then
> +			echo Setting up bonding interfaces:
>  			for bond in $(echo $IPOIB_BONDS|tr , " ") ;  do
>  				eval bond_ip=\$${bond}_IP
>  				if [ -z $bond_ip ]; then
> @@ -810,7 +811,13 @@ start()
>  					echo No slaves defined for $bond
>  					continue
>  				fi
> -				ib-bond --bond-name $bond 
> --bond-ip $bond_ip --slaves $bond_slaves
> +				ib-bond --bond-name $bond 
> --bond-ip $bond_ip --slaves $bond_slaves 
> +				RC=$?
> +				if [ $RC -eq 0 ] ; then
> +					echo_success $"Bringing 
> up interface $bond"
> +				else
> +					echo_failure $"Bringing 
> up interface $bond"
> +				fi
>  			done
>  		fi
>          fi
> @@ -1064,7 +1071,9 @@ stop()
>          fi
>  
>          # Down all bond interfaces
> -	ib-bond --stop-all
> +	if ( which ib-bond &>/dev/null ) ; then
> +		ib-bond --stop-all
> +	fi
>  
>          # Stop SRP HA daemon if running
>          if [ -f $srp_daemon_pidfile ]; then
> 
> _______________________________________________
> ewg mailing list
> ewg at lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg
> 



More information about the ewg mailing list