Whamcloud - gitweb
LU-8526 tests: ensure all OSTs active for allocations
[fs/lustre-release.git] / lustre / tests / conf-sanity.sh
index 19eabf5..2a0dc2d 100755 (executable)
@@ -455,17 +455,16 @@ run_test 5c "cleanup after failed mount (bug 2712) (should return errs)"
 
 test_5d() {
        grep " $MOUNT " /etc/mtab &&
-               error false "unexpected entry in mtab before mount" && return 10
+               error "unexpected entry in mtab before mount"
 
        start_ost || error "OST start failed"
        start_mds || error "MDS start failed"
-       stop_ost || error "Unable to stop OST1"
+       stop_ost -f || error "Unable to stop OST1"
        mount_client $MOUNT || error "mount_client $MOUNT failed"
        umount_client $MOUNT -f || error "umount_client $MOUNT failed"
        cleanup_nocli || error "cleanup_nocli failed with $?"
-       grep " $MOUNT " /etc/mtab &&
+       ! grep " $MOUNT " /etc/mtab ||
                error "$MOUNT entry in mtab after unmount"
-       pass
 }
 run_test 5d "mount with ost down"
 
@@ -702,7 +701,7 @@ run_test 19a "start/stop MDS without OSTs"
 
 test_19b() {
        start_ost || error "Unable to start OST1"
-       stop_ost || error "Unable to stop OST1"
+       stop_ost -f || error "Unable to stop OST1"
 }
 run_test 19b "start/stop OSTs without MDS"
 
@@ -5642,19 +5641,6 @@ test_81() { # LU-4665
 }
 run_test 81 "sparse OST indexing"
 
-# Wait OSTs to be active on both client and MDT side.
-wait_osts_up() {
-       local cmd="$LCTL get_param -n lov.$FSNAME-clilov-*.target_obd |
-               awk 'BEGIN {c = 0} /ACTIVE/{c += 1} END {printf \\\"%d\\\", c}'"
-       wait_update $HOSTNAME "eval $cmd" $OSTCOUNT ||
-               error "wait_update OSTs up on client failed"
-
-       cmd="$LCTL get_param -n lod.$FSNAME-MDT*-*.target_obd | sort -u |
-            awk 'BEGIN {c = 0} /ACTIVE/{c += 1} END {printf \\\"%d\\\", c}'"
-       wait_update_facet $SINGLEMDS "eval $cmd" $OSTCOUNT ||
-               error "wait_update OSTs up on MDT failed"
-}
-
 # Here we exercise the stripe placement functionality on a file system that
 # has formatted the OST with a random index. With the file system the following
 # functionality is tested: