Whamcloud - gitweb
b=19737
authorgrev <grev>
Tue, 6 Oct 2009 11:06:18 +0000 (11:06 +0000)
committergrev <grev>
Tue, 6 Oct 2009 11:06:18 +0000 (11:06 +0000)
i=Robert.Read
t-f NFSCLIENT changes

lustre/tests/acceptance-small.sh
lustre/tests/test-framework.sh

index 17b3821..0c272d8 100755 (executable)
@@ -50,6 +50,8 @@ FORMAT=${FORMAT:-formatall}
 CLEANUP=${CLEANUP:-stopall}
 
 setup_if_needed() {
+    nfs_client_mode && return
+
     local MOUNTED=$(mounted_lustre_filesystems)
     if $(echo $MOUNTED | grep -w -q $MOUNT); then
         check_config $MOUNT
index 9c185fc..1486650 100644 (file)
@@ -1317,6 +1317,8 @@ stopall() {
 }
 
 cleanupall() {
+    nfs_client_mode && return
+
     stopall $*
     unload_modules
 }
@@ -1371,6 +1373,8 @@ writeconf_all () {
 }
 
 setupall() {
+    nfs_client_mode && return
+
     sanity_mount_check ||
         error "environments are insane!"
 
@@ -1476,7 +1480,24 @@ init_param_vars () {
     fi
 }
 
+nfs_client_mode () {
+    if [ "$NFSCLIENT" ]; then
+        echo "NFSCLIENT mode: setup, cleanup, check config skipped"
+        local clients=$CLIENTS
+        [ -z $clients ] && clients=$(hostname)
+
+        # FIXME: remove hostname when 19215 fixed
+        do_nodes $clients "echo \\\$(hostname); grep ' '$MOUNT' ' /proc/mounts"
+        declare -a nfsexport=(`grep ' '$MOUNT' ' /proc/mounts | awk '{print $1}' | awk -F: '{print $1 " "  $2}'`)
+        do_nodes ${nfsexport[0]} "echo \\\$(hostname); df -T  ${nfsexport[1]}"
+        return
+    fi
+    return 1
+}
+
 check_config () {
+    nfs_client_mode && return
+
     local mntpt=$1
     local myMGS_host=$mgs_HOST
     if [ "$NETTYPE" = "ptl" ]; then
@@ -1506,6 +1527,8 @@ check_timeout () {
 }
 
 check_and_setup_lustre() {
+    nfs_client_mode && return
+
     local MOUNTED=$(mounted_lustre_filesystems)
     if [ -z "$MOUNTED" ] || ! $(echo $MOUNTED | grep -w -q $MOUNT); then
         [ "$REFORMAT" ] && formatall