Whamcloud - gitweb
LU-2059 tests: skip local config tests only on ZFS
authorAndreas Dilger <adilger@whamcloud.com>
Fri, 5 Oct 2012 03:04:34 +0000 (21:04 -0600)
committerOleg Drokin <green@whamcloud.com>
Fri, 12 Oct 2012 03:38:44 +0000 (23:38 -0400)
Only skip conf-sanity.sh (5d, 19b, 21b, 27a) and insanity.sh (2, 4)
when the backing OST filesystem type is ZFS, not for ldiskfs.  The
support for locally-cached config llogs is not implemented for ZFS
yet, so ZFS OSTs cannot be started without the MGS yet.

The ZFS local config support is in progress and these tests will be
re-enabled as part of the landing.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I8c49483401a7132ce09b93aa5d93610c4d500c1e
Reviewed-on: http://review.whamcloud.com/4234
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Li Wei <liwei@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/conf-sanity.sh
lustre/tests/insanity.sh

index b453de7..9b54ac3 100644 (file)
@@ -19,9 +19,6 @@ if [ "$FAILURE_MODE" = "HARD" ]; then
        ALWAYS_EXCEPT="$ALWAYS_EXCEPT $CONFIG_EXCEPTIONS"
 fi
 
        ALWAYS_EXCEPT="$ALWAYS_EXCEPT $CONFIG_EXCEPTIONS"
 fi
 
-# LU-2059
-ALWAYS_EXCEPT="$ALWAYS_EXCEPT 5d 19b 21b 27a"
-
 # bug number for skipped test:
 # a tool to create lustre filesystem images
 ALWAYS_EXCEPT="32newtarball $ALWAYS_EXCEPT"
 # bug number for skipped test:
 # a tool to create lustre filesystem images
 ALWAYS_EXCEPT="32newtarball $ALWAYS_EXCEPT"
@@ -421,6 +418,9 @@ test_5d() {
        grep " $MOUNT " /etc/mtab && \
                error false "unexpected entry in mtab before mount" && return 10
 
        grep " $MOUNT " /etc/mtab && \
                error false "unexpected entry in mtab before mount" && return 10
 
+       [ "$(facet_fstype ost1)" = "zfs" ] &&
+               skip "LU-2059: no local config for ZFS OSTs" && return
+
        local rc=0
        start_ost
        start_mds
        local rc=0
        start_ost
        start_mds
@@ -660,6 +660,9 @@ test_19a() {
 run_test 19a "start/stop MDS without OSTs"
 
 test_19b() {
 run_test 19a "start/stop MDS without OSTs"
 
 test_19b() {
+       [ "$(facet_fstype ost1)" = "zfs" ] &&
+               skip "LU-2059: no local config for ZFS OSTs" && return
+
        start_ost || return 1
        stop_ost -f || return 2
 }
        start_ost || return 1
        stop_ost -f || return 2
 }
@@ -696,6 +699,9 @@ test_21a() {
 run_test 21a "start mds before ost, stop ost first"
 
 test_21b() {
 run_test 21a "start mds before ost, stop ost first"
 
 test_21b() {
+       [ "$(facet_fstype ost1)" = "zfs" ] &&
+               skip "LU-2059: no local config for ZFS OSTs" && return
+
         start_ost
        start_mds
         wait_osc_import_state mds ost FULL
         start_ost
        start_mds
         wait_osc_import_state mds ost FULL
@@ -961,6 +967,9 @@ test_26() {
 run_test 26 "MDT startup failure cleans LOV (should return errs)"
 
 test_27a() {
 run_test 26 "MDT startup failure cleans LOV (should return errs)"
 
 test_27a() {
+       [ "$(facet_fstype ost1)" = "zfs" ] &&
+               skip "LU-2059: no local config for ZFS OSTs" && return
+
        start_ost || return 1
        start_mds || return 2
        echo "Requeue thread should have started: "
        start_ost || return 1
        start_mds || return 2
        echo "Requeue thread should have started: "
index e113e34..c294320 100755 (executable)
@@ -1,4 +1,7 @@
-#!/bin/sh
+#!/bin/bash
+# -*- mode: Bash; tab-width: 4; indent-tabs-mode: t; -*-
+# vim:shiftwidth=4:softtabstop=4:tabstop=4:
+#
 # Test multiple failures, AKA Test 17
 
 set -e
 # Test multiple failures, AKA Test 17
 
 set -e
@@ -61,12 +64,12 @@ set_fail_client() {
 }
 
 fail_clients() {
 }
 
 fail_clients() {
-    num=$1
+       num=$1
 
 
-    log "Request clients to fail: ${num}. Num of clients to fail: ${FAIL_NUM}, already failed: $DOWN_NUM"
-    if [ -z "$num"  ] || [ "$num" -gt $((FAIL_NUM - DOWN_NUM)) ]; then
-       num=$((FAIL_NUM - DOWN_NUM)) 
-    fi
+       log "Request fail clients: $num, to fail: $FAIL_NUM, failed: $DOWN_NUM"
+       if [ -z "$num"  ] || [ "$num" -gt $((FAIL_NUM - DOWN_NUM)) ]; then
+               num=$((FAIL_NUM - DOWN_NUM))
+       fi
     
     if [ -z "$num" ] || [ "$num" -le 0 ]; then
         log "No clients failed!"
     
     if [ -z "$num" ] || [ "$num" -le 0 ]; then
         log "No clients failed!"
@@ -84,56 +87,57 @@ fail_clients() {
 
     echo "down clients: $DOWN_CLIENTS"
 
 
     echo "down clients: $DOWN_CLIENTS"
 
-    for client in $DOWN_CLIENTS; do
-       boot_node $client
-    done
-    DOWN_NUM=`echo $DOWN_CLIENTS | wc -w`
-    client_rmdirs
+       for client in $DOWN_CLIENTS; do
+               boot_node $client
+       done
+       DOWN_NUM=`echo $DOWN_CLIENTS | wc -w`
+       client_rmdirs
 }
 
 reintegrate_clients() {
 }
 
 reintegrate_clients() {
-    for client in $DOWN_CLIENTS; do
-       wait_for_host $client
-       echo "Restarting $client"
-       zconf_mount $client $MOUNT || return 1
-    done
-    DOWN_CLIENTS=""
-    DOWN_NUM=0
+       for client in $DOWN_CLIENTS; do
+               wait_for_host $client
+               echo "Restarting $client"
+               zconf_mount $client $MOUNT || return 1
+       done
+
+       DOWN_CLIENTS=""
+       DOWN_NUM=0
 }
 
 start_ost() {
 }
 
 start_ost() {
-    start ost$1 `ostdevname $1` $OST_MOUNT_OPTS
+       start ost$1 `ostdevname $1` $OST_MOUNT_OPTS
 }
 
 trap exit INT
 
 client_touch() {
 }
 
 trap exit INT
 
 client_touch() {
-    file=$1
-    for c in $LIVE_CLIENT $FAIL_CLIENTS;  do
-       if echo $DOWN_CLIENTS | grep -q $c; then continue; fi
-       $PDSH $c touch $TESTDIR/${c}_$file || return 1
-    done
+       file=$1
+       for c in $LIVE_CLIENT $FAIL_CLIENTS; do
+               echo $DOWN_CLIENTS | grep -q $c && continue
+               $PDSH $c touch $TESTDIR/${c}_$file || return 1
+       done
 }
 
 client_rm() {
 }
 
 client_rm() {
-    file=$1
-    for c in $LIVE_CLIENT $FAIL_CLIENTS;  do
-       $PDSH $c rm $TESTDIR/${c}_$file
-    done
+       file=$1
+       for c in $LIVE_CLIENT $FAIL_CLIENTS; do
+               $PDSH $c rm $TESTDIR/${c}_$file
+       done
 }
 
 client_mkdirs() {
 }
 
 client_mkdirs() {
-    for c in $LIVE_CLIENT $FAIL_CLIENTS;  do
-       echo "$c mkdir $TESTDIR/$c"
-       $PDSH $c "mkdir $TESTDIR/$c && ls -l $TESTDIR/$c"
-    done
+       for c in $LIVE_CLIENT $FAIL_CLIENTS; do
+               echo "$c mkdir $TESTDIR/$c"
+               $PDSH $c "mkdir $TESTDIR/$c && ls -l $TESTDIR/$c"
+       done
 }
 
 client_rmdirs() {
 }
 
 client_rmdirs() {
-    for c in $LIVE_CLIENT $FAIL_CLIENTS;  do
-       echo "rmdir $TESTDIR/$c"
-       $PDSH $LIVE_CLIENT "rmdir $TESTDIR/$c"
-    done
+       for c in $LIVE_CLIENT $FAIL_CLIENTS; do
+               echo "rmdir $TESTDIR/$c"
+               $PDSH $LIVE_CLIENT "rmdir $TESTDIR/$c"
+       done
 }
 
 clients_recover_osts() {
 }
 
 clients_recover_osts() {
@@ -169,8 +173,11 @@ run_test 1 "MDS/MDS failure"
 
 ############### Second Failure Mode ###############
 test_2() {
 
 ############### Second Failure Mode ###############
 test_2() {
-    echo "Verify Lustre filesystem is up and running"
-    [ -z "$(mounted_lustre_filesystems)" ] && error "Lustre is not running"
+       echo "Verify Lustre filesystem is up and running"
+       [ -z "$(mounted_lustre_filesystems)" ] && error "Lustre is not running"
+
+       [ "$(facet_fstype ost1)" = "zfs" ] &&
+               skip "LU-2059: no local config for ZFS OSTs" && return
 
     clients_up
 
 
     clients_up
 
@@ -239,7 +246,10 @@ run_test 3  "Thirdb Failure Mode: MDS/CLIENT `date`"
 
 ############### Fourth Failure Mode ###############
 test_4() {
 
 ############### Fourth Failure Mode ###############
 test_4() {
-    echo "Fourth Failure Mode: OST/MDS `date`"
+       echo "Fourth Failure Mode: OST/MDS `date`"
+
+       [ "$(facet_fstype ost1)" = "zfs" ] &&
+               skip "LU-2059: no local config for ZFS OSTs" && return
 
     #OST Portion
     shutdown_facet ost1
 
     #OST Portion
     shutdown_facet ost1