Whamcloud - gitweb
b=21900 verify that the pool ost is available
authorNathan Rutman <nathan.rutman@oracle.com>
Fri, 4 Jun 2010 21:17:05 +0000 (14:17 -0700)
committerJohann Lombardi <johann@sun.com>
Fri, 4 Jun 2010 21:23:02 +0000 (23:23 +0200)
i=dmitry.zoguine

lustre/tests/ost-pools.sh

index 2699b46..bb5b29b 100644 (file)
@@ -1319,11 +1319,20 @@ test_25() {
                wait_osc_import_state mds ost FULL
                clients_up
 
-        # Veriy that the pool got created and is usable
-               df $POOL_ROOT
-               echo "Creating a file in pool$i"
-               create_file $POOL_ROOT/file$i pool$i || break
-               check_file_in_pool $POOL_ROOT/file$i pool$i || break
+               # Verify that the pool got created and is usable
+               df $POOL_ROOT > /dev/null
+               sleep 5
+               # Make sure OST0 can be striped on
+               $SETSTRIPE -o 0 -c 1 $POOL_ROOT/$tfile
+               STR=$($GETSTRIPE $POOL_ROOT/$tfile | grep 0x | cut -f2 | tr -d " ")
+               rm $POOL_ROOT/$tfile
+               if [[ "$STR" == "0" ]]; then
+                       echo "Creating a file in pool$i"
+                       create_file $POOL_ROOT/file$i pool$i || break
+                       check_file_in_pool $POOL_ROOT/file$i pool$i || break
+               else
+                       echo "OST 0 seems to be unavailable.  Try later."
+               fi
        done
 
     rm -rf $POOL_ROOT