Whamcloud - gitweb
b=16551
authorgrev <grev>
Thu, 6 Nov 2008 11:47:15 +0000 (11:47 +0000)
committergrev <grev>
Thu, 6 Nov 2008 11:47:15 +0000 (11:47 +0000)
i=Adilger
correct remote_[mds|ost] fn to work correctly on configuration with
several MDS/OSS nodes

lustre/tests/test-framework.sh

index 19cc076..f44a51e 100644 (file)
@@ -1793,10 +1793,18 @@ osc_to_ost()
     echo $ost
 }
 
+remote_node () {
+    local node=$1
+    [ "$node" != "$(hostname)" ]
+}
+
 remote_mds ()
 {
-    local var=${SINGLEMDS}_HOST
-    [ "${!var}" != "$(hostname)" ]
+    local node
+    for node in $(mdts_nodes); do
+        remote_node $node && return 0
+    done
+    return 1
 }
 
 remote_mds_nodsh()
@@ -1806,7 +1814,11 @@ remote_mds_nodsh()
 
 remote_ost ()
 {
-    [ "$ost_HOST" != "$(hostname)" ]
+    local node
+    for node in $(osts_nodes) ; do
+        remote_node $node && return 0
+    done
+    return 1
 }
 
 remote_ost_nodsh()