Whamcloud - gitweb
land b1_5 onto HEAD
[fs/lustre-release.git] / lustre / tests / cfg / insanity-ltest.sh
1 #need to get the functions defined in the cluster's .sh configuration
2 . $LTESTDIR/harness/config/$MACHINENAME/config.sh
3 # comma_list and friends
4 . $LTESTDIR/harness/config/common/utility_functions.sh
5
6 all_but_one_clients() {
7     local n=0
8     local clients=""
9     for client in ${CLIENTS//,/ }; do
10         if [ $n -gt 0 ]; then
11             # don't include first client
12             clients="$clients $client"
13         fi
14         let n=n+1
15     done
16     echo $clients
17 }
18
19 # make sure client list is a comma separated list
20 CLIENTS=`comma_list $CLIENTS`
21 # could probably set this to $CLIENT1
22 #FAIL_CLIENT=${CLIENT1}
23
24 mds_HOST=${mds_HOST:-${MDSNODE1}}
25 mdsfailover_HOST=${mdsfailover_HOST:-${MDSNODE2}}
26 ost1_HOST=${ost1_HOST:-${OSTNODE1}}
27 ost2_HOST=${ost2_HOST:-${OSTNODE2}}
28 EXTRA_OSTS=${EXTRA_OSTS:-""}
29 client_HOST=${CLIENT1}
30 LIVE_CLIENT=${LIVE_CLIENT:-${CLIENT1}}
31 # This should always be a list, not a regexp
32 FAIL_CLIENTS=${FAIL_CLIENTS:-"`all_but_one_clients`"}
33
34 NETTYPE=${NETTYPE:-${NETTYPE}}
35
36 TIMEOUT=${TIMEOUT:-30}
37 PTLDEBUG=${PTLDEBUG:-0}
38 SUBSYSTEM=${SUBSYSTEM:-0}
39 MOUNT=${MOUNT:-${MOUNTPT}}
40 #UPCALL=${CLIENT_UPCALL:-"${LUSTRE_TESTS}/replay-single-upcall.sh"}
41
42 mdsdev1=${MDSDEV[1]:-$MDSDEVBASE}
43 MDSDEV=${MDSDEV:-${mdsdev1}}
44
45 # need to pull off the --size 
46 if [ -n "$MDSSIZE" ]; then
47     MDSSIZE=`echo $MDSSIZE | awk '{print $2}'`
48 else
49     MDSSIZE=100000
50 fi
51 MDSJOURNALSIZE=${MDSJOURNALSIZE:-0}
52
53 ostdev1=${OSTDEV[1]:-$OSTDEVBASE}
54 OSTDEV=${OSTDEV:-${ostdev1}}
55
56 # need to pull off the --size 
57 if [ -n "$OSTSIZE" ]; then
58     OSTSIZE=`echo $OSTSIZE | awk '{print $2}'`
59 else
60     OSTSIZE=100000
61 fi
62 OSTJOURNALSIZE=${OSTJOURNALSIZE:-0}
63
64 FSTYPE=${FSTYPE:-ext3}
65 STRIPE_BYTES=${STRIPE_BYTES:-1048576} 
66 STRIPES_PER_OBJ=${STRIPES_PER_OBJ:-0}
67
68 FAILURE_MODE=${FAILURE_MODE:-HARD} # or HARD
69 #POWER_DOWN=${POWER_DOWN:-"powerman --off"}
70 #POWER_UP=${POWER_UP:-"powerman --on"}
71 POWER_UP=$POWER_ON
72 POWER_DOWN=$POWER_OFF
73
74 PDSH="${DSH}"