fi
# skip nfs tests on kernels >= 4.14.0 until they are fixed
-if [ $LINUX_VERSION_CODE -ge $(version_code 4.14.0) ];then
+if [ $LINUX_VERSION_CODE -ge $(version_code 4.14.0) ]; then
# bug number: LU-12661
ALWAYS_EXCEPT+=" 817"
fi
+# skip cgroup tests on RHEL8.1 kernels until they are fixed
+if (( $LINUX_VERSION_CODE >= $(version_code 4.18.0) &&
+ $LINUX_VERSION_CODE < $(version_code 5.4.0) )); then
+ # bug number: LU-13063
+ ALWAYS_EXCEPT+=" 411"
+fi
# 5 12 (min)"
[ "$SLOW" = "no" ] && EXCEPT_SLOW="27m 64b 68 71 115 135 136 300o"
[ $MDS1_VERSION -le $(version_code 2.3.55) ] &&
TESTS="4094 4095"
- # skip long symlink name for rhel6.5.
- # rhel6.5 has a limit (PATH_MAX - sizeof(struct filename))
- grep -q '6.5' /etc/redhat-release &>/dev/null &&
- TESTS="59 60 61 4062 4063"
-
for i in $TESTS; do
local SYMNAME=$(str_repeat 'x' $i)
ln -s $SYMNAME $DIR/$tdir/f$i || error "failed $i-char symlink"
}
run_test 123b "not panic with network error in statahead enqueue (bug 15027)"
+test_123c() {
+ [[ $MDSCOUNT -lt 2 ]] && skip_env "needs >= 2 MDTs"
+
+ test_mkdir -i 0 -c 1 $DIR/$tdir.0
+ test_mkdir -i 1 -c 1 $DIR/$tdir.1
+ touch $DIR/$tdir.1/{1..3}
+ mv $DIR/$tdir.1/{1..3} $DIR/$tdir.0
+
+ remount_client $MOUNT
+
+ $MULTIOP $DIR/$tdir.0 Q
+
+ # let statahead to complete
+ ls -l $DIR/$tdir.0 > /dev/null
+
+ testid=$(echo $TESTNAME | tr '_' ' ')
+ dmesg | tac | sed "/$testid/,$ d" | grep "Can not initialize inode" &&
+ error "statahead warning" || true
+}
+run_test 123c "Can not initialize inode warning on DNE statahead"
+
test_124a() {
[ $PARALLEL == "yes" ] && skip "skip parallel run"
$LCTL get_param -n mdc.*.connect_flags | grep -q lru_resize ||
remote_mds_nodsh && skip "remote MDS with nodsh"
remote_ost_nodsh && skip "remote OST with nodsh"
- # eventually, this can also be replaced with "lctl get_param -R",
- # but not until that option is always available on the server
local facet
for facet in mds1 ost1; do
- [ $(lustre_version_code $facet) -le $(version_code 2.5.54) ] &&
- skip_noexit "Too old lustre on $facet"
- local facet_proc_dirs=$(do_facet $facet \
- \\\ls -d $proc_regexp 2>/dev/null)
- echo "${facet}_proc_dirs='$facet_proc_dirs'"
- [ -z "$facet_proc_dirs" ] && error "no proc_dirs on $facet"
- do_facet $facet find $facet_proc_dirs \
- ! -name req_history \
- -exec cat '{}' \\\; &> /dev/null
-
- do_facet $facet find $facet_proc_dirs \
- ! -name req_history \
- -type f \
- -exec cat '{}' \\\; &> /dev/null ||
- error "proc file read failed"
-
- do_facet $facet find $facet_proc_dirs \
- -ignore_readdir_race \
- -type f \
- -not -name force_lbug \
- -not -name changelog_mask \
- -exec badarea_io '{}' \\\; ||
- error_133 "$facet find $facet_proc_dirs failed"
+ local facet_ver=$(lustre_version_code $facet)
+ if [ $facet_ver -ge $(version_code 2.7.65) ]; then
+ do_facet $facet "$LCTL get_param -R '*'" &> /dev/null
+ else
+ log "$facet: too old lustre for get_param -R"
+ fi
+ if [ $facet_ver -ge $(version_code 2.5.54) ]; then
+ do_facet $facet "$LCTL list_param -R '*' | grep '=' |
+ tr -d= | egrep -v 'force_lbug|changelog_mask' |
+ xargs badarea_io" ||
+ error_133 "$facet badarea_io failed"
+ else
+ skip_noexit "$facet: too old lustre for get_param -R"
+ fi
done
# remount the FS in case writes/reads /proc break the FS
# generate some changelog records to accumulate on each MDT
test_mkdir -c $MDSCOUNT $DIR/$tdir || error "test_mkdir $tdir failed"
+ log "$(date +%s): creating first files"
createmany -m $DIR/$tdir/$tfile $((MDSCOUNT * 2)) ||
error "create $DIR/$tdir/$tfile failed"
# check changelogs have been generated
+ local start=$SECONDS
+ local idle_time=$((MDSCOUNT * 5 + 5))
local nbcl=$(changelog_dump | wc -l)
[[ $nbcl -eq 0 ]] && error "no changelogs found"
- for param in "changelog_max_idle_time=10" \
+ for param in "changelog_max_idle_time=$idle_time" \
"changelog_gc=1" \
"changelog_min_gc_interval=2" \
"changelog_min_free_cat_entries=3"; do
do_nodes $mdts $LCTL set_param mdd.*.$param
done
- # force cl_user2 to be idle (1st part)
- sleep 9
+ # force cl_user2 to be idle (1st part), but also cancel the
+ # cl_user1 records so that it is not evicted later in the test.
+ local sleep1=$((idle_time / 2))
+ echo "$(date +%s): sleep1 $sleep1/${idle_time}s"
+ sleep $sleep1
# simulate changelog catalog almost full
#define OBD_FAIL_CAT_FREE_RECORDS 0x1313
"$user_rec1, but is $user_rec2"
done
- # force cl_user2 to be idle (2nd part) and to reach
- # changelog_max_idle_time
- sleep 2
+ # force cl_user2 idle (2nd part) to just exceed changelog_max_idle_time
+ local sleep2=$((idle_time - (SECONDS - start) + 1))
+ echo "$(date +%s): sleep2 $sleep2/${idle_time}s"
+ sleep $sleep2
- # generate one more changelog to trigger fail_loc
- createmany -m $DIR/$tdir/${tfile}bis $((MDSCOUNT * 2)) ||
- error "create $DIR/$tdir/${tfile}bis failed"
+ # Generate one more changelog to trigger GC at fail_loc for cl_user2.
+ # cl_user1 should be OK because it recently processed records.
+ echo "$(date +%s): creating $((MDSCOUNT * 2)) files"
+ createmany -m $DIR/$tdir/${tfile}b $((MDSCOUNT * 2)) ||
+ error "create $DIR/$tdir/${tfile}b failed"
# ensure gc thread is done
for i in $(mdts_nodes); do
"$FSNAME.sys.jobid_var" $new_jobenv
}
-test_205() { # Job stats
+test_205a() { # Job stats
[ $PARALLEL == "yes" ] && skip "skip parallel run"
[[ $MDS1_VERSION -ge $(version_code 2.7.1) ]] ||
skip "Need MDS version with at least 2.7.1"
verify_jobstats "touch $DIR/$tfile" $SINGLEMDS
}
-run_test 205 "Verify job stats"
+run_test 205a "Verify job stats"
+
+# LU-13117
+test_205b() {
+ $LCTL set_param jobid_var=USER jobid_name="%e.%u"
+ env -i USERTESTJOBSTATS=foolish touch $DIR/$tfile.1
+ do_facet $SINGLEMDS $LCTL get_param mdt.*.job_stats |
+ grep job_id: | grep foolish &&
+ error "Unexpected jobid found"
+ true
+}
+run_test 205b "Verify job stats jobid parsing"
# LU-1480, LU-1773 and LU-1657
test_206() {