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

lustre/tests/test-framework.sh

index c5dd2f0..d0b7200 100644 (file)
@@ -1577,9 +1577,14 @@ osc_to_ost()
     echo $ost
 }
 
+remote_node () {
+    local node=$1
+    [ "$node" != "$(hostname)" ]
+}
+
 remote_mds ()
 {
-    [ "$mds_HOST" != "$(hostname)" ]
+    remote_node $mds_HOST
 }
 
 remote_mds_nodsh()
@@ -1589,7 +1594,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()