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"
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
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
}
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
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: "
-#!/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
}
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!"
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() {
- 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$1 `ostdevname $1` $OST_MOUNT_OPTS
+ start ost$1 `ostdevname $1` $OST_MOUNT_OPTS
}
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() {
- 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() {
- 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() {
- 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() {
############### 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
############### 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