From 76729a1bd0421113ebf30adb018536f820d86fbb Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Thu, 23 Jan 2014 12:03:45 -0700 Subject: [PATCH] LU-4515 tests: set fail_loc only once per node Since fail_loc and fail_val are common for all services on a node, it is only necessary to set it once per node instead of once per facet. That avoids a bunch of extra remote commands and spew in the test output. Signed-off-by: Andreas Dilger Change-Id: I9a69eb325fa80a90d929ab9a258cce21973ebbe5 Reviewed-on: http://review.whamcloud.com/8978 Tested-by: Jenkins Reviewed-by: Faccini Bruno Tested-by: Maloo Reviewed-by: Jian Yu Reviewed-by: Oleg Drokin --- lustre/tests/sanity-quota.sh | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/lustre/tests/sanity-quota.sh b/lustre/tests/sanity-quota.sh index b6dc9da..4bc5bab 100644 --- a/lustre/tests/sanity-quota.sh +++ b/lustre/tests/sanity-quota.sh @@ -89,21 +89,18 @@ SHOW_QUOTA_INFO_GROUP="$LFS quota -t -g $DIR" build_test_filter lustre_fail() { - local fail_node=$1 + local fail_node=$1 local fail_loc=$2 local fail_val=${3:-0} + local NODES= - if [ $fail_node == "mds" ] || [ $fail_node == "mds_ost" ]; then - do_facet $SINGLEMDS "lctl set_param fail_val=$fail_val" - do_facet $SINGLEMDS "lctl set_param fail_loc=$fail_loc" - fi + case $fail_node in + mds_ost|mdt_ost) NODES="$(comma_list $(mdts_nodes) $(osts_nodes))";; + mds|mdt) NODES="$(comma_list $(mdts_nodes))";; + ost) NODES="$(comma_list $(osts_nodes))";; + esac - if [ $fail_node == "ost" ] || [ $fail_node == "mds_ost" ]; then - for num in `seq $OSTCOUNT`; do - do_facet ost$num "lctl set_param fail_val=$fail_val" - do_facet ost$num "lctl set_param fail_loc=$fail_loc" - done - fi + do_nodes $NODES "lctl set_param fail_val=$fail_val fail_loc=$fail_loc" } RUNAS="runas -u $TSTID -g $TSTID" -- 1.8.3.1