-x hostname,hostname,...
exclude the specified list of nodes (separated by commas)
-v verbose mode
- csv file a spreadsheet that contains configuration parameters
+ csv file a spreadsheet that contains configuration parameters
(separated by commas) for each target in a Lustre cl-
- uster, the first field of each line is the host name
+ uster, the first field of each line is the host name
of the cluster node
EOF
USE_ALLNODES=false
EXCLUDED_NODELIST=$OPTARG
;;
- v)
+ v)
VERBOSE_OUTPUT=true
;;
- ?)
- usage
+ ?)
+ usage
esac
done
}
# ping_host host_name
-# Check whether host $host_name is reachable.
+# Check whether host $host_name is reachable.
# If it is, then return the IP address of this host.
ping_host() {
local host_name=$1
fi
# Get the IP address of ${HOST_NAMES[i]} from its own ping
- ip_pattern="[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}"
- ip_addr=`echo "${ret_str}" | egrep -o "${ip_pattern}"`
- ip_addr=`echo "${ip_addr}" | sed -e 's/^(//' -e 's/)$//'`
+ ip_pattern="[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}"
+ ip_addr=`echo "${ret_str}" | egrep -m 1 -o "${ip_pattern}"`
# Compare IP addresses
# Check whether ${HOST_NAMES[i]} agrees with the local host
"\"${ip_addr}\". They are not the same!"
return 1
fi
-
+
return 0
}
# Initialize the HOST_IPADDRS array
unset HOST_IPADDRS
- # Get all the host names to be operated on
+ # Get all the host names to be operated on
! get_hostnames && return 1
- # Check the network connectivity between local host
+ # Check the network connectivity between local host
# and other cluster nodes
for ((i = 0; i < ${#HOST_NAMES[@]}; i++)); do
[ "${HOST_NAMES[i]}" = "`hostname`" ] && continue
# Main flow
if ! check_file ${CSV_FILE}; then
- exit 1
+ exit 1
fi
# Cluster network verification
if ! network_verify; then
- exit 1
+ exit 1
fi
exit 0