From: yujian Date: Mon, 26 Jun 2006 10:07:42 +0000 (+0000) Subject: b=9863 X-Git-Tag: v1_7_100~1^90~8^2~65 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=e4187ecd105e5fcd9b92361a8dbe9bb08d4b1f22;p=fs%2Flustre-release.git b=9863 Modify the condition to check whether a target was made to be high-available. --- diff --git a/lustre/scripts/lustre_createcsv.sh b/lustre/scripts/lustre_createcsv.sh index f55b8f2..da95c87 100755 --- a/lustre/scripts/lustre_createcsv.sh +++ b/lustre/scripts/lustre_createcsv.sh @@ -416,8 +416,8 @@ get_module_opts() { } #************************ HA software configurations ************************# -# is_ha_target hostname target_svname -# Check whether the target service @target_svname was made to be high-available +# is_ha_target hostname target_devname +# Check whether the target @target_devname was made to be high-available is_ha_target() { local host_name=$1 local target_svname=$2 @@ -517,7 +517,8 @@ get_hb_configs() { [ -z "`echo \"${line}\"|egrep -v \"^#\"`" ] && continue SRV_IPADDRS=`echo ${line} | awk '{print $2}'` - [ -n "${SRV_IPADDRS}" ] && break + [ -n "${SRV_IPADDRS}" ] \ + && [ "`echo ${line} | awk '{print $1}'`" = "${host_name}" ] && break done < <(${REMOTE} ${host_name} "cat ${HA_RES}") if [ -z "${SRV_IPADDRS}" ]; then @@ -534,7 +535,7 @@ get_hb_configs() { # Execute remote command to check whether this target service # was made to be high-available - if is_ha_target ${host_name} ${TARGET_SVNAMES[i]}; then + if is_ha_target ${host_name} ${TARGET_DEVNAMES[i]}; then HA_CONFIGS[i]=${HB_CHANNELS},${SRV_IPADDRS},${HB_OPTIONS} fi done @@ -635,7 +636,7 @@ get_cluman_configs() { # Execute remote command to check whether this target service # was made to be high-available - ! is_ha_target ${host_name} ${TARGET_SVNAMES[i]} && continue + ! is_ha_target ${host_name} ${TARGET_DEVNAMES[i]} && continue # Execute remote command to get Heartbeat channel HB_CHANNELS=$(get_cluman_channel ${host_name})