Newer
Older
return 5
fi
return 0
}
run_test 48 "Don't lose transno when client is evicted (2525)"
createmany -o $DIR/$tfile-%d 400 || return 1
unlinkmany $DIR/$tfile-%d 0 400 || return 2
$CHECKSTAT -t file $DIR/$tfile-* && return 3 || true
}
run_test 49 "re-write records to llog as written during fail"
test_50() {
local osc_dev=`$LCTL device_list | \
awk '(/ost_svc_mds1_svc/){print $4}' `
$LCTL --device %$osc_dev recover && $LCTL --device %$osc_dev recover
# give the mds_lov_sync threads a chance to run
sleep 5
}
run_test 50 "Double OSC recovery, don't LASSERT (3812)"
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
# bug 3462 - simultaneous MDC requests
test_51a() {
replay_barrier_nodf mds
mkdir -p $DIR/${tdir}-1
mkdir -p $DIR/${tdir}-2
touch $DIR/${tdir}-2/f
multiop $DIR/${tdir}-1/f O_c &
pid=$!
# give multiop a chance to open
sleep 1
do_facet mds "sysctl -w lustre.fail_loc=0x80000115"
kill -USR1 $pid
do_facet mds "sysctl -w lustre.fail_loc=0"
$CHECKSTAT -t file $DIR/${tdir}-2/f || return 1
fail mds
wait $pid || return 2
$CHECKSTAT -t file $DIR/${tdir}-1/f || return 3
rm -rf $DIR/${tdir}-*
}
run_test 51a "|X| close request while two MDC requests in flight"
test_51b() {
replay_barrier_nodf mds
mkdir -p $DIR/$tdir-1
mkdir -p $DIR/$tdir-2
multiop $DIR/$tdir-1/f O_c &
pid=$!
# give multiop a chance to open
sleep 1
do_facet mds "sysctl -w lustre.fail_loc=0x80000107"
touch $DIR/${tdir}-2/f &
usleep 500
do_facet mds "sysctl -w lustre.fail_loc=0"
kill -USR1 $pid
wait $pid || return 1
fail mds
$CHECKSTAT -t file $DIR/${tdir}-1/f || return 2
$CHECKSTAT -t file $DIR/${tdir}-2/f || return 3
rm -rf $DIR/${tdir}-*
}
run_test 51b "|X| open request while two MDC requests in flight"
test_51c() {
replay_barrier_nodf mds
mkdir -p $DIR/${tdir}-1
mkdir -p $DIR/${tdir}-2
multiop $DIR/${tdir}-1/f O_c &
pid=$!
# give multiop a chance to open
sleep 1
do_facet mds "sysctl -w lustre.fail_loc=0x80000107"
touch $DIR/${tdir}-2/f &
do_facet mds "sysctl -w lustre.fail_loc=0"
do_facet mds "sysctl -w lustre.fail_loc=0x80000115"
kill -USR1 $pid
do_facet mds "sysctl -w lustre.fail_loc=0"
fail mds
wait $pid || return 1
$CHECKSTAT -t file $DIR/${tdir}-1/f || return 2
$CHECKSTAT -t file $DIR/${tdir}-2/f || return 3
rm -rf $DIR/${tdir}-*
}
run_test 51c "|X| open request and close request while two MDC requests in flight"
test_51d() {
replay_barrier_nodf mds
mkdir -p $DIR/${tdir}-1
mkdir -p $DIR/${tdir}-2
touch $DIR/${tdir}-2/f
multiop $DIR/${tdir}-1/f O_c &
pid=$!
# give multiop a chance to open
sleep 1
do_facet mds "sysctl -w lustre.fail_loc=0x80000122"
kill -USR1 $pid
do_facet mds "sysctl -w lustre.fail_loc=0"
#$CHECKSTAT -t file $DIR/${tdir}-2/f || return 1
fail mds
wait $pid || return 2
$CHECKSTAT -t file $DIR/${tdir}-1/f || return 3
rm -rf $DIR/${tdir}-*
}
run_test 51d "|X| close reply while two MDC requests in flight"
test_51e() {
replay_barrier_nodf mds
mkdir -p $DIR/$tdir-1
mkdir -p $DIR/$tdir-2
multiop $DIR/$tdir-1/f O_c &
pid=$!
# give multiop a chance to open
sleep 1
do_facet mds "sysctl -w lustre.fail_loc=0x80000119"
touch $DIR/${tdir}-2/f &
usleep 500
do_facet mds "sysctl -w lustre.fail_loc=0"
kill -USR1 $pid
wait $pid || return 1
fail mds
$CHECKSTAT -t file $DIR/${tdir}-1/f || return 2
$CHECKSTAT -t file $DIR/${tdir}-2/f || return 3
rm -rf $DIR/${tdir}-*
}
run_test 51e "|X| open reply while two MDC requests in flight"
test_51f() {
replay_barrier_nodf mds
mkdir -p $DIR/${tdir}-1
mkdir -p $DIR/${tdir}-2
multiop $DIR/${tdir}-1/f O_c &
pid=$!
# give multiop a chance to open
sleep 1
do_facet mds "sysctl -w lustre.fail_loc=0x80000119"
touch $DIR/${tdir}-2/f &
do_facet mds "sysctl -w lustre.fail_loc=0"
do_facet mds "sysctl -w lustre.fail_loc=0x80000122"
kill -USR1 $pid
do_facet mds "sysctl -w lustre.fail_loc=0"
fail mds
wait $pid || return 1
$CHECKSTAT -t file $DIR/${tdir}-1/f || return 2
$CHECKSTAT -t file $DIR/${tdir}-2/f || return 3
rm -rf $DIR/${tdir}-*
}
run_test 51f "|X| open reply and close reply while two MDC requests in flight"
test_51g() {
replay_barrier_nodf mds
mkdir -p $DIR/${tdir}-1
mkdir -p $DIR/${tdir}-2
multiop $DIR/${tdir}-1/f O_c &
pid=$!
# give multiop a chance to open
sleep 1
do_facet mds "sysctl -w lustre.fail_loc=0x80000119"
touch $DIR/${tdir}-2/f &
do_facet mds "sysctl -w lustre.fail_loc=0"
do_facet mds "sysctl -w lustre.fail_loc=0x80000115"
kill -USR1 $pid
do_facet mds "sysctl -w lustre.fail_loc=0"
fail mds
wait $pid || return 1
$CHECKSTAT -t file $DIR/${tdir}-1/f || return 2
$CHECKSTAT -t file $DIR/${tdir}-2/f || return 3
rm -rf $DIR/${tdir}-*
}
run_test 51g "|X| open reply and close request while two MDC requests in flight"
test_51h() {
replay_barrier_nodf mds
mkdir -p $DIR/${tdir}-1
mkdir -p $DIR/${tdir}-2
multiop $DIR/${tdir}-1/f O_c &
pid=$!
# give multiop a chance to open
sleep 1
do_facet mds "sysctl -w lustre.fail_loc=0x80000107"
touch $DIR/${tdir}-2/f &
do_facet mds "sysctl -w lustre.fail_loc=0"
do_facet mds "sysctl -w lustre.fail_loc=0x80000122"
kill -USR1 $pid
do_facet mds "sysctl -w lustre.fail_loc=0"
fail mds
wait $pid || return 1
$CHECKSTAT -t file $DIR/${tdir}-1/f || return 2
$CHECKSTAT -t file $DIR/${tdir}-2/f || return 3
rm -rf $DIR/${tdir}-*
}
run_test 51h "|X| open request and close reply while two MDC requests in flight"
# b3764 timed out lock replay
test_52() {
touch $DIR/$tfile
cancel_lru_locks MDC
multiop $DIR/$tfile s
replay_barrier mds1
do_facet mds1 "sysctl -w lustre.fail_loc=0x8000030c"
fail mds1
do_facet mds1 "sysctl -w lustre.fail_loc=0x0"
$CHECKSTAT -t file $DIR/$tfile-* && return 3 || true
}
run_test 52 "time out lock replay (3764)"
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
test_53() {
replay_barrier_nodf mds
f1=$DIR/${tfile}-1
cat <<EOF > $f1
#!/bin/sh
true
EOF
chmod +x $f1
do_facet mds "sysctl -w lustre.fail_loc=0x80000107"
$f1 || return 1
do_facet mds "sysctl -w lustre.fail_loc=0"
fail mds
rm -f $f1
}
run_test 53 "|X| open request and close reply while two MDC requests in flight"
test_54() {
replay_barrier mds
createmany -o $DIR/$tfile 20
unlinkmany $DIR/$tfile 20
fail mds
}
run_test 54 "|X| open request and close reply while two MDC requests in flight"
#b3440 ASSERTION(rec->ur_fid2->id) failed
test_55() {
sysctl -w portals.debug=-1 portals.debug_mb=25
ln -s foo $DIR/$tfile
replay_barrier mds
#drop_reply "cat $DIR/$tfile"
fail mds
sleep 10
lctl dk /r/tmp/debug
}
run_test 55 "don't replay a symlink open request (3440)"
#b3761 ASSERTION(hash != 0) failed
test_56() {
# OBD_FAIL_MDS_OPEN_CREATE | OBD_FAIL_ONCE
do_facet mds "sysctl -w lustre.fail_loc=0x8000012b"
touch $DIR/$tfile
pid=$!
# give a chance for touch to run
sleep 5
do_facet mds "sysctl -w lustre.fail_loc=0x0"
wait $pid || return 1
rm $DIR/$tfile
return 0
}
run_test 56 "let MDS_CHECK_RESENT return the original return code instead of 0"
equals_msg test complete, cleaning up