Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-1187 tests: Add DNE test cases in sanity.
[fs/lustre-release.git]
/
lustre
/
tests
/
obdfilter-survey.sh
diff --git
a/lustre/tests/obdfilter-survey.sh
b/lustre/tests/obdfilter-survey.sh
index
3c8aff9
..
d78f7b4
100644
(file)
--- a/
lustre/tests/obdfilter-survey.sh
+++ b/
lustre/tests/obdfilter-survey.sh
@@
-12,6
+12,7
@@
size=${size:-1024}
# the summary file a bit smaller than OSTSIZE
. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
# the summary file a bit smaller than OSTSIZE
. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
+init_logging
[ "$SLOW" = no ] && { nobjhi=1; thrhi=4; }
thrlo=${thrlo:-$(( thrhi / 2))}
[ "$SLOW" = no ] && { nobjhi=1; thrhi=4; }
thrlo=${thrlo:-$(( thrhi / 2))}
@@
-32,17
+33,24
@@
if [ $(( size * 1024 )) -ge $minsize ]; then
echo min kbytesavail: $minsize using size=${size} MBytes per obd instance
fi
echo min kbytesavail: $minsize using size=${size} MBytes per obd instance
fi
+get_devs() {
+ echo $(do_nodes $1 'lctl dl | grep obdfilter' | \
+ awk '{print $4}' | sort -u)
+}
+
get_targets () {
local targets
local devs
get_targets () {
local targets
local devs
+ local nid
local oss
for oss in $(osts_nodes); do
local oss
for oss in $(osts_nodes); do
- devs=$(do_node $oss "lctl dl |grep obdfilter |sort" | awk '{print $4}')
+ devs=$(get_devs $oss)
+ nid=$(host_nids_address $oss $NETTYPE)
for d in $devs; do
# if oss is local -- obdfilter-survey needs dev wo/ host
target=$d
for d in $devs; do
# if oss is local -- obdfilter-survey needs dev wo/ host
target=$d
- [[ $oss = `hostname`
]] || target=$oss
:$target
+ [[ $oss = `hostname`
&& "$1" == "netdisk" ]] || target=$nid
:$target
targets="$targets $target"
done
done
targets="$targets $target"
done
done
@@
-55,9
+63,9
@@
obdflter_survey_targets () {
local targets
case $case in
local targets
case $case in
- disk) targets=$(get_targets);;
- netdisk) targets=$(get_targets);;
- network) targets=
"$(osts_nodes)"
;;
+ disk) targets=$(get_targets
$case
);;
+ netdisk) targets=$(get_targets
$case
);;
+ network) targets=
$(host_nids_address $(comma_list $(osts_nodes)) $NETTYPE)
;;
*) error "unknown obdflter-survey case!" ;;
esac
echo $targets
*) error "unknown obdflter-survey case!" ;;
esac
echo $targets
@@
-95,11
+103,14
@@
print_jbd () {
check_jbd_values () {
local facet=$1
local thrhi=$2
check_jbd_values () {
local facet=$1
local thrhi=$2
+ local rtime=$3
# last two lines from history
# $4: run >= 5000
# $8: hndls >= thrhi * 2
# last two lines from history
# $4: run >= 5000
# $8: hndls >= thrhi * 2
- local hist=("$(print_jbd history $facet | tail -3 | head -2)")
+ # display history of rtime/4 before, in case obd cleanup consumes time
+ local tlines=$((rtime / 5 / 4 + 1))
+ local hist=("$(print_jbd history $facet | tail -$tlines | head -1)")
echo "$hist"
local run=($(echo "${hist[*]}" | awk '{print $4}'))
local hndls=($(echo "${hist[*]}" | awk '{print $8}'))
echo "$hist"
local run=($(echo "${hist[*]}" | awk '{print $4}'))
local hndls=($(echo "${hist[*]}" | awk '{print $8}'))
@@
-117,10
+128,11
@@
check_jbd_values () {
check_jbd_values_facets () {
local facets=$1
local thrhi=$2
check_jbd_values_facets () {
local facets=$1
local thrhi=$2
+ local rtime=$3
local facet
local rc=0
for facet in ${facets//,/ }; do
local facet
local rc=0
for facet in ${facets//,/ }; do
- check_jbd_values $facet $thrhi || rc=$((rc+$?))
+ check_jbd_values $facet $thrhi
$rtime
|| rc=$((rc+$?))
done
return $rc
}
done
return $rc
}
@@
-133,9
+145,14
@@
test_1b () {
save_lustre_params $(comma_list $(osts_nodes)) "obdfilter.${FSNAME}-*.sync_journal" >$param_file
do_nodesv $(comma_list $(osts_nodes)) lctl set_param obdfilter.${FSNAME}-*.sync_journal=0
save_lustre_params $(comma_list $(osts_nodes)) "obdfilter.${FSNAME}-*.sync_journal" >$param_file
do_nodesv $(comma_list $(osts_nodes)) lctl set_param obdfilter.${FSNAME}-*.sync_journal=0
+ local stime=$(date +%s)
thrlo=4 nobjhi=1 thrhi=4 obdflter_survey_run disk
thrlo=4 nobjhi=1 thrhi=4 obdflter_survey_run disk
+ local etime=$(date +%s)
+ # run time of obd survey
+ local rtime=$((etime - stime))
- check_jbd_values_facets $(get_facets OST) 4 || rc=$((rc+$?))
+ echo "obd survey finished in $rtime seconds"
+ check_jbd_values_facets $(get_facets OST) 4 $rtime || rc=$((rc+$?))
restore_lustre_params < $param_file
restore_lustre_params < $param_file
@@
-144,6
+161,12
@@
test_1b () {
}
run_test 1b "Object Storage Targets survey, async journal"
}
run_test 1b "Object Storage Targets survey, async journal"
+test_1c () {
+ nobjlo=1 nobjhi=1 thrlo=128 thrhi=128 rszlo=1024 rszhi=1024 size=8192\
+ obdflter_survey_run disk
+}
+run_test 1c "Object Storage Targets survey, big batch"
+
test_2a () {
obdflter_survey_run netdisk
}
test_2a () {
obdflter_survey_run netdisk
}
@@
-157,9
+180,13
@@
test_2b () {
save_lustre_params $(comma_list $(osts_nodes)) "obdfilter.${FSNAME}-*.sync_journal" >$param_file
do_nodesv $(comma_list $(osts_nodes)) lctl set_param obdfilter.${FSNAME}-*.sync_journal=0
save_lustre_params $(comma_list $(osts_nodes)) "obdfilter.${FSNAME}-*.sync_journal" >$param_file
do_nodesv $(comma_list $(osts_nodes)) lctl set_param obdfilter.${FSNAME}-*.sync_journal=0
+ local stime=$(date +%s)
thrlo=4 nobjhi=1 thrhi=4 obdflter_survey_run netdisk
thrlo=4 nobjhi=1 thrhi=4 obdflter_survey_run netdisk
+ local etime=$(date +%s)
+ local rtime=$((etime - stime))
- check_jbd_values_facets $(get_facets OST) 4 || rc=$((rc+$?))
+ echo "obd survey finished in $rtime seconds"
+ check_jbd_values_facets $(get_facets OST) 4 $rtime || rc=$((rc+$?))
restore_lustre_params < $param_file
restore_lustre_params < $param_file
@@
-183,7
+210,7
@@
test_3a () {
}
run_test 3a "Network survey"
}
run_test 3a "Network survey"
-complete $
(basename $0) $
SECONDS
+complete $SECONDS
cleanup_echo_devs
check_and_cleanup_lustre
exit_status
cleanup_echo_devs
check_and_cleanup_lustre
exit_status