Whamcloud - gitweb
b=23996 grep lfs getstripe output for pools correctly
[fs/lustre-release.git] / lustre / tests / ost-pools.sh
index 8357fd4..11404d0 100644 (file)
@@ -148,10 +148,15 @@ check_file_in_osts() {
         return 0
 }
 
+file_pool() {
+    $GETSTRIPE -v $1 | grep "^lmm_pool:" | tr -d "[:blank:]" | cut -f 2 -d ':'
+}
+
 check_file_not_in_pool() {
     local file=$1
     local pool=$2
-    local res=$($GETSTRIPE -v $file | grep "^pool:" | tr -d "[:blank:]" | cut -f 2 -d ':')
+    local res=$(file_pool $file)
+
     if [[ "$res" == "$pool" ]]; then
         error "File $file is in pool: $res"
         return 1
@@ -988,16 +993,17 @@ test_18() {
 
        # Set this high until we establish a baseline for what the degradation
        # is / should be
-       max=15
+       max=30
     diff=$(echo "scale=2; ($time2 - $time1) * 100 / $time1" | bc)
     echo  "No pool to wide pool: $diff %."
     deg=$(echo "scale=2; $diff > $max" | bc)
-    [ "$deg" == "1" ] && error "Degradation with wide pool is $diff % (> $max %)"
+    [ "$deg" == "1" ] && error_ignore 23408  "Degradation with wide pool is $diff % (> $max %)"
 
+       max=15
     diff=$(echo "scale=2; ($time3 - $time1) * 100 / $time1" | bc)
     echo  "No pool to missing pool: $diff %."
     deg=$(echo "scale=2; $diff > $max" | bc)
-    [ "$deg" == "1" ] && error "Degradation with missing pool is $diff % (> $max %)"
+    [ "$deg" == "1" ] && error_ignore 23408 "Degradation with missing pool is $diff % (> $max %)"
 
     return 0
 }
@@ -1290,8 +1296,7 @@ test_24() {
           if [ "$pool" != "" ]; then
               check_file_in_pool $file $pool
           fi
-          pool1=$($GETSTRIPE -v $file | grep "^pool:" |\
-              tr -d '[:blank:]' | cut -f 2 -d ':')
+          pool1=$(file_pool $file)
           count1=$($GETSTRIPE -v $file | grep "^lmm_stripe_count:" |\
               tr -d '[:blank:]' | cut -f 2 -d ':')
           size1=$($GETSTRIPE -v $file | grep "^lmm_stripe_size:" |\