Whamcloud - gitweb
LU-17452 tests: fix interop sanityn tests with b2_15
[fs/lustre-release.git] / lustre / tests / recovery-oss-scale.sh
1 #!/bin/bash
2 #
3 # Was Test 11 in cmd3.
4 # For duration of 24 hours repeatedly failover a random OSS at
5 # 10 minute intervals and verify that no application errors occur.
6
7 # Test runs one of CLIENT_LOAD progs on remote clients.
8 set -e
9
10 ONLY=${ONLY:-"$*"}
11
12 LUSTRE=${LUSTRE:-$(dirname $0)/..}
13 . $LUSTRE/tests/test-framework.sh
14 . $LUSTRE/tests/recovery-scale-lib.sh
15 init_test_env "$@"
16 init_logging
17
18 # bug number for skipped test:
19 ALWAYS_EXCEPT="$RECOVERY_OSS_SCALE_EXCEPT "
20 # UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
21
22 build_test_filter
23
24 remote_ost_nodsh && skip_env "remote OST with nodsh"
25
26 if (( CLIENTCOUNT < 3 )); then
27         skip_env "need three or more clients"
28 fi
29
30 # SHARED_DIRECTORY should be specified with a shared directory which is
31 # accessable on all of the nodes
32 if [[ -z "$SHARED_DIRECTORY" ]] || ! check_shared_dir "$SHARED_DIRECTORY"; then
33         skip_env "SHARED_DIRECTORY not set"
34 fi
35
36 ERRORS_OK=""    # No application failures should occur during this test.
37
38 check_and_setup_lustre
39 rm -rf $DIR/[Rdfs][0-9]*
40
41 insulate_clients
42 check_progs_installed $NODES_TO_USE "${CLIENT_LOADS[@]}"
43
44 MAX_RECOV_TIME=$(max_recovery_time)
45 MDTS=$(get_facets MDS)
46 OSTS=$(get_facets OST)
47
48 # Print informaiton about settings
49 run_info $SERVER_FAILOVER_PERIOD $DURATION $MINSLEEP $SLOW $REQFAIL \
50         $SHARED_DIRECTORY $END_RUN_FILE $LOAD_PID_FILE $VMSTAT_PID_FILE \
51         $CLIENTCOUNT $MDTS $OSTS
52
53 test_failover_ost() {
54         # failover a random OST
55         failover_target OST
56 }
57 run_test failover_ost "failover OST"
58
59 zconf_mount $HOSTNAME $MOUNT || error "mount $MOUNT on $HOSTNAME failed"
60 client_up || error "start client on $HOSTNAME failed"
61
62 complete_test $SECONDS
63 check_and_cleanup_lustre
64 exit_status