From: Shaun Tancheff Date: Tue, 15 Sep 2020 21:35:08 +0000 (-0500) Subject: LU-13941 test: Restrict create_count to valid range X-Git-Tag: 2.13.56~2 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=b00f4d80bf278a103724ab7552a6b77d01c380a0 LU-13941 test: Restrict create_count to valid range create_count range is restricted to: [OST_MIN_PRECREATE=32, OST_MAX_PRECREATE=20000] Enforce this restriction rather that halt with an error. Test-Parameters: trivial testlist=parallel-scale HPE-bug-id: LUS-5960 Fixes: 21501dedf64e ("LU-9780 tests: Testing Round-Robin allocation") Signed-off-by: Shaun Tancheff Change-Id: I125f2121a57d16a9031ed21938ce2f0b99b9dea8 Reviewed-on: https://review.whamcloud.com/39798 Reviewed-by: Andreas Dilger Tested-by: jenkins Tested-by: Maloo Reviewed-by: James Nunez --- diff --git a/lustre/tests/functions.sh b/lustre/tests/functions.sh index 9a27e27..cf35d89 100644 --- a/lustre/tests/functions.sh +++ b/lustre/tests/functions.sh @@ -1041,7 +1041,7 @@ run_rr_alloc() { # Save mdt values, set threshold to 100% i.e always Round Robin, # restore the saved values again after creating files... save_lustre_params mds1 \ - "lov.$FSNAME-MDT0000*.qos_threshold_rr" > $qos_prec_objs + "lod.$FSNAME-MDT0000*.qos_threshold_rr" > $qos_prec_objs save_lustre_params mds1 \ "osp.$FSNAME-OST*-osc-MDT0000.create_count" >> $qos_prec_objs @@ -1057,10 +1057,20 @@ run_rr_alloc() { foeo_calc=$((rr_alloc_NFILES * total_MNTPTS / OSTCOUNT)) local create_count=$((2 * foeo_calc)) - do_facet mds1 "$LCTL set_param -n \ - lov.$FSNAME-MDT0000*.qos_threshold_rr 100 \ - osp.$FSNAME-OST*-osc-MDT0000.create_count $create_count" || - error "failed while setting qos_threshold_rr & creat_count" + + # create_count accepted values: + # [OST_MIN_PRECREATE=32, OST_MAX_PRECREATE=20000] + # values outside this range are ignored and -ERANGE is returned. + # NOTE: actual maximum value is 16384 (2^14) + [[ $create_count -lt 32 ]] && create_count=32 + [[ $create_count -gt 20000 ]] && create_count=20000 + local i + for i in $(seq $MDSCOUNT); do + do_facet mds$i "$LCTL set_param -n \ + lod.$FSNAME-MDT0000*.qos_threshold_rr=100 \ + osp.$FSNAME-OST*-osc-MDT0000.create_count=$create_count" || + error "failed while setting qos_threshold_rr & creat_count" + done # Create few temporary files in order to increase the precreated objects # to a desired value, before starting 'rr_alloc' app. Due to default