Whamcloud - gitweb
LU-427 test: Test failure on test suite lfsck
[fs/lustre-release.git] / lustre / tests / parallel-scale-nfsv3.sh
1 #!/bin/bash
2 #
3 #set -vx
4
5 LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)}
6 . $LUSTRE/tests/test-framework.sh
7 init_test_env $@
8 . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
9 init_logging
10
11 . $LUSTRE/tests/setup-nfs.sh
12
13 # first unmount all the lustre client
14 cleanup_mount $MOUNT
15 # mount lustre on mds
16 lustre_client=$(facet_active_host $SINGLEMDS)
17 zconf_mount_clients $lustre_client $MOUNT || \
18     error "mount lustre on $lustre_client failed"
19
20 # setup the nfs
21 if ! setup_nfs "3" "$MOUNT" "$lustre_client" "$CLIENTS"; then
22     error_noexit false "setup nfs failed!"
23     cleanup_nfs "$MOUNT" "$lustre_client" "$CLIENTS" || \
24         error_noexit false "failed to cleanup nfs"
25     if ! zconf_umount_clients $lustre_client $MOUNT force; then
26         error_noexit false "failed to umount lustre on $lustre_client"
27     elif ! zconf_mount_clients $CLIENTS $MOUNT; then
28         error_noexit false "failed to mount lustre after nfs test"
29     fi
30     check_and_cleanup_lustre
31     exit
32 fi
33
34 NFSCLIENT=yes
35 FAIL_ON_ERROR=false
36
37 # common setup
38 #
39 MACHINEFILE=${MACHINEFILE:-$TMP/$(basename $0 .sh).machines}
40 clients=${CLIENTS:-$HOSTNAME}
41 generate_machine_file $clients $MACHINEFILE || \
42     error "Failed to generate machine file"
43 num_clients=$(get_node_count ${clients//,/ })
44
45 # compilbench
46 #
47 cbench_DIR=${cbench_DIR:-"/usr/bin"}
48 cbench_IDIRS=${cbench_IDIRS:-4}
49 # FIXME: wiki page requirements is 30, do we really need 30 ?
50 cbench_RUNS=${cbench_RUNS:-4}
51
52 if [ "$SLOW" = "no" ]; then
53     cbench_IDIRS=2
54     cbench_RUNS=2
55 fi
56
57 #
58 # metabench
59 #
60 METABENCH=${METABENCH:-$(which metabench 2> /dev/null || true)}
61 mbench_NFILES=${mbench_NFILES:-30400}
62 [ "$SLOW" = "no" ] && mbench_NFILES=10000
63 # threads per client
64 mbench_THREADS=${mbench_THREADS:-4}
65
66 #
67 # connectathon
68 #
69 cnt_DIR=${cnt_DIR:-""}
70 cnt_NRUN=${cnt_NRUN:-10}
71 [ "$SLOW" = "no" ] && cnt_NRUN=2
72
73 #
74 # IOR
75 #
76 IOR=${IOR:-$(which IOR 2> /dev/null || true)}
77 # threads per client
78 ior_THREADS=${ior_THREADS:-2}
79 ior_iteration=${ior_iteration:-1}
80 ior_blockSize=${ior_blockSize:-6} # Gb
81 ior_xferSize=${ior_xferSize:-2m}
82 ior_type=${ior_type:-POSIX}
83 ior_DURATION=${ior_DURATION:-60} # minutes
84 [ "$SLOW" = "no" ] && ior_DURATION=30
85
86 # source the common file after all parameters are set to take affect
87 . $LUSTRE/tests/functions.sh
88
89 build_test_filter
90 check_and_setup_lustre
91
92 get_mpiuser_id $MPI_USER
93 MPI_RUNAS=${MPI_RUNAS:-"runas -u $MPI_USER_UID -g $MPI_USER_GID"}
94 $GSS_KRB5 && refresh_krb5_tgt $MPI_USER_UID $MPI_USER_GID $MPI_RUNAS
95
96 test_compilebench() {
97     run_compilebench
98 }
99 run_test compilebench "compilebench"
100
101 test_metabench() {
102     run_metabench
103 }
104 run_test metabench "metabench"
105
106 test_connectathon() {
107     run_connectathon
108 }
109 run_test connectathon "connectathon"
110
111 test_iorssf() {
112     run_ior "ssf"
113 }
114 run_test iorssf "iorssf"
115
116 test_iorfpp() {
117     run_ior "fpp"
118 }
119 run_test iorfpp "iorfpp"
120
121 # cleanup nfs
122 cleanup_nfs "$MOUNT" "$lustre_client" "$CLIENTS" || \
123     error_noexit false "cleanup_nfs failed"
124 if ! zconf_umount_clients $lustre_client $MOUNT force; then
125     error_noexit false "failed to umount lustre on $lustre_client"
126 elif ! zconf_mount_clients $CLIENTS $MOUNT; then
127     error_noexit false "failed to mount lustre after nfs test"
128 fi
129
130 complete $(basename $0) $SECONDS
131 check_and_cleanup_lustre
132 exit_status