From: nic Date: Fri, 9 Dec 2005 18:36:13 +0000 (+0000) Subject: b=7283 X-Git-Tag: v1_7_100~1^103~4^2~180 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=2fd141fa7e70fd0f25f4aac915b9b0a713ff03dd;p=fs%2Flustre-release.git b=7283 r=adilger allow tests to handle non-default ACCEPTOR_PORT --- diff --git a/lustre/tests/conf-sanity.sh b/lustre/tests/conf-sanity.sh index 75c20ce..3815714 100644 --- a/lustre/tests/conf-sanity.sh +++ b/lustre/tests/conf-sanity.sh @@ -618,7 +618,7 @@ test_15() { do_node `hostname` mkdir -p $MOUNT 2> /dev/null # load llite module on the client if it isn't in /lib/modules do_node `hostname` lconf --nosetup --node client_facet $XMLCONFIG - do_node `hostname` mount -t lustre -o nettype=$NETTYPE \ + do_node `hostname` mount -t lustre -o nettype=$NETTYPE,$MOUNTOPT \ `facet_active_host mds`:/mds_svc/client_facet $MOUNT ||return $? echo "mount lustre on $MOUNT with $MOUNTLUSTRE: success" [ -d /r ] && $LCTL modules > /r/tmp/ogdb-`hostname` @@ -627,7 +627,7 @@ test_15() { [ -f "$MOUNTLUSTRE" ] && rm -f $MOUNTLUSTRE echo "mount lustre on ${MOUNT} without $MOUNTLUSTRE....." - do_node `hostname` mount -t lustre -o nettype=$NETTYPE \ + do_node `hostname` mount -t lustre -o nettype=$NETTYPE,$MOUNTOPT \ `facet_active_host mds`:/mds_svc/client_facet $MOUNT &&return $? echo "mount lustre on $MOUNT without $MOUNTLUSTRE failed as expected" cleanup || return $? diff --git a/lustre/tests/echo.sh b/lustre/tests/echo.sh index 0c2ab30..10a0bd9 100755 --- a/lustre/tests/echo.sh +++ b/lustre/tests/echo.sh @@ -17,6 +17,7 @@ HOSTNAME=`hostname` SERVER=${SERVER:-$HOSTNAME} CLIENT=${CLIENT:-$HOSTNAME} NET=${NET:-tcp} +[ "$ACCEPTOR_PORT" ] && PORT_OPT="--port $ACCEPTOR_PORT" h2tcp () { case $1 in @@ -60,7 +61,7 @@ STRIPES_PER_OBJ=2 # 0 means stripe over all OSTs rm -f $config # create nodes $LMC --add node --node $SERVER || exit 1 -$LMC --add net --node $SERVER --nid `h2$NET $SERVER` --nettype $NET || exit 2 +$LMC --add net --node $SERVER --nid `h2$NET $SERVER` --nettype $NET $PORT_OPT|| exit 2 if (($LOV)); then $LMC --add mds --node $SERVER --mds mds1 --fstype $FSTYPE --dev $MDSDEV --size $MDSSIZE || exit 10 @@ -75,7 +76,7 @@ fi if [ "$SERVER" != "$CLIENT" ]; then $LMC --add node --node $CLIENT || exit 1 - $LMC --add net --node $CLIENT --nid `h2$NET $CLIENT` --nettype $NET || exit 2 + $LMC --add net --node $CLIENT --nid `h2$NET $CLIENT` --nettype $NET $PORT_OPT || exit 2 fi $LMC --add echo_client --node $CLIENT --ost ${OBD_NAME} || exit 3 diff --git a/lustre/tests/local.sh b/lustre/tests/local.sh index ced41d2..0a8cc71 100755 --- a/lustre/tests/local.sh +++ b/lustre/tests/local.sh @@ -14,6 +14,7 @@ FSTYPE=${FSTYPE:-ext3} MOUNT=${MOUNT:-/mnt/lustre} MOUNT2=${MOUNT2:-${MOUNT}2} NETTYPE=${NETTYPE:-tcp} +[ "$ACCEPTOR_PORT" ] && PORT_OPT="--port $ACCEPTOR_PORT" OSTDEV=${OSTDEV:-$TMP/ost1-`hostname`} OSTSIZE=${OSTSIZE:-400000} @@ -59,8 +60,9 @@ h2iib () { # create nodes ${LMC} --add node --node $HOSTNAME || exit 10 -${LMC} --add net --node $HOSTNAME --nid `h2$NETTYPE $HOSTNAME` --nettype $NETTYPE || exit 11 -${LMC} --add net --node client --nid '*' --nettype $NETTYPE || exit 12 +${LMC} --add net --node $HOSTNAME --nid `h2$NETTYPE $HOSTNAME` \ + --nettype $NETTYPE $PORT_OPT || exit 11 +${LMC} --add net --node client --nid '*' --nettype $NETTYPE $PORT_OPT|| exit 12 # configure mds server [ "x$MDS_MOUNT_OPTS" != "x" ] && diff --git a/lustre/tests/lov.sh b/lustre/tests/lov.sh index 7130ad0..352c2b9 100755 --- a/lustre/tests/lov.sh +++ b/lustre/tests/lov.sh @@ -16,6 +16,7 @@ FSTYPE=${FSTYPE:-ext3} MOUNT=${MOUNT:-/mnt/lustre} MOUNT2=${MOUNT2:-${MOUNT}2} NETTYPE=${NETTYPE:-tcp} +[ "$ACCEPTOR_PORT" ] && PORT_OPT="--port $ACCEPTOR_PORT" OSTCOUNT=${OSTCOUNT:-5} # OSTDEVN will still override the device for OST N @@ -39,8 +40,9 @@ rm -f $config # create nodes ${LMC} --add node --node $HOSTNAME || exit 10 -${LMC} --add net --node $HOSTNAME --nid $HOSTNAME --nettype $NETTYPE || exit 11 -${LMC} --add net --node client --nid '*' --nettype $NETTYPE || exit 12 +${LMC} --add net --node $HOSTNAME --nid $HOSTNAME \ + --nettype $NETTYPE $PORT_OPT || exit 11 +${LMC} --add net --node client --nid '*' --nettype $NETTYPE $PORT_OPT || exit 12 [ "x$QUOTA_OPTS" != "x" ] && QUOTA_OPTS="--quota $QUOTA_OPTS" diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 0c58930..fd5a7a9 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -47,6 +47,7 @@ IOPENTEST1=${IOPENTEST1:-iopentest1} IOPENTEST2=${IOPENTEST2:-iopentest2} MEMHOG=${MEMHOG:-memhog} DIRECTIO=${DIRECTIO:-directio} +ACCEPTOR_PORT=${ACCEPTOR_PORT:-988} if [ $UID -ne 0 ]; then echo "Warning: running as non-root uid $UID" @@ -2723,7 +2724,7 @@ test_100() { netstat -tna | while read PROT SND RCV LOCAL REMOTE STAT; do [ "$PROT" != "tcp" ] && continue RPORT=`echo $REMOTE | cut -d: -f2` - [ "$RPORT" != "988" ] && continue + [ "$RPORT" != "$ACCEPTOR_PORT" ] && continue LPORT=`echo $LOCAL | cut -d: -f2` [ $LPORT -ge 1024 ] && error "local port: $LPORT > 1024" || true done diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index 1055789..0a4f437 100644 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -42,6 +42,15 @@ init_test_env() { export CHECKSTAT="${CHECKSTAT:-checkstat} " export FSYTPE=${FSTYPE:-"ext3"} + if [ "$ACCEPTOR_PORT" ]; then + if [ -z "$MOUNTOPT" ]; then + export MOUNTOPT="port=$ACCEPTOR_PORT" + else + export MOUNTOPT="$MOUNTOPT,port=$ACCEPTOR_PORT" + fi + export PORT_OPT="--port $ACCEPTOR_PORT" + fi + # Paths on remote nodes, if different export RLUSTRE=${RLUSTRE:-$LUSTRE} export RPWD=${RPWD:-$PWD} @@ -343,7 +352,8 @@ add_facet() { echo "add facet $facet: `facet_host $facet`" do_lmc --add node --node ${facet}_facet $@ --timeout $TIMEOUT \ --lustre_upcall $UPCALL --ptldebug $PTLDEBUG --subsystem $SUBSYSTEM - do_lmc --add net --node ${facet}_facet --nid `facet_nid $facet` --nettype lnet + do_lmc --add net --node ${facet}_facet --nid `facet_nid $facet` \ + --nettype lnet $PORT_OPT } add_mds() { diff --git a/lustre/tests/uml.sh b/lustre/tests/uml.sh index 9c8955d..e887a9f 100644 --- a/lustre/tests/uml.sh +++ b/lustre/tests/uml.sh @@ -27,6 +27,7 @@ CLIENTOPT="user_xattr,acl,${CLIENTOPT:-""}" NETTYPE=${NETTYPE:-tcp} NIDTYPE=${NIDTYPE:-$NETTYPE} +[ "$ACCEPTOR_PORT" ] && PORT_OPT="--port $ACCEPTOR_PORT" # NOTE - You can't have different MDS/OST nodes and also have clients on the # MDS/OST nodes without using --endlevel and --startlevel during lconf. @@ -87,7 +88,8 @@ h2iib () { echo -n "adding NET for:" for NODE in `echo $MDSNODE $OSTNODES $CLIENTS | tr -s " " "\n" | sort -u`; do echo -n " $NODE" - ${LMC} -m $config --add net --node $NODE --nid `h2$NIDTYPE $NODE` --nettype $NETTYPE || exit 1 + ${LMC} -m $config --add net --node $NODE --nid `h2$NIDTYPE $NODE` \ + --nettype $NETTYPE $PORT_OPT || exit 1 done # configure mds server