Whamcloud - gitweb
LU-14754 tests: add Overstripe support to racer 64/43964/5
authorElena Gryaznova <elena.gryaznova@hpe.com>
Thu, 10 Jun 2021 09:19:44 +0000 (12:19 +0300)
committerOleg Drokin <green@whamcloud.com>
Mon, 13 Dec 2021 03:53:09 +0000 (03:53 +0000)
The files are created with a overstripe layout if
RACER_ENABLE_OVERSTRIPE=true is set.

We would like to have the ability to use the "real"
layouts, i.e. to limit the number of stripes per OST
instead of allowing racer to achieve the max LOV_MAX_STRIPE_COUNT
value. Patch adds RACER_LOV_MAX_STRIPECOUNT equal to
LOV_MAX_STRIPE_COUNT by default.

Test-Parameters: trivial testlist=racer
Signed-off-by: Elena Gryaznova <elena.gryaznova@hpe.com>
HPE-bug-id: LUS-9466, LUS-9608
Reviewed-by: Vladimir Saveliev <vladimir.saveliev@hpe.com>
Reviewed-by: Vitaly Fertman <vitaly.fertman@hpe.com>
Reviewed-by: Andriy Skulysh <andriy.skulysh@hpe.com>
Change-Id: I550922938438afa121af275fd1d6f60082db9b54
Reviewed-on: https://review.whamcloud.com/43964
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Vladimir Saveliev <vlaidimir.saveliev@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/racer.sh
lustre/tests/racer/file_create.sh

index 35c1cbd..b1c07c3 100644 (file)
@@ -70,6 +70,9 @@ RACER_ENABLE_PFL=${RACER_ENABLE_PFL:-true}
 RACER_ENABLE_DOM=${RACER_ENABLE_DOM:-true}
 RACER_ENABLE_FLR=${RACER_ENABLE_FLR:-true}
 RACER_ENABLE_SEL=${RACER_ENABLE_SEL:-true}
+# set false, LU-14988
+RACER_ENABLE_OVERSTRIPE=${RACER_ENABLE_OVERSTRIPE:-false}
+RACER_LOV_MAX_STRIPECOUNT=${RACER_LOV_MAX_STRIPECOUNT:-$LOV_MAX_STRIPE_COUNT}
 RACER_EXTRA_LAYOUT=${RACER_EXTRA_LAYOUT:-""}
 
 fail_random_facet () {
@@ -133,6 +136,9 @@ test_1() {
                        RACER_ENABLE_FLR=$RACER_ENABLE_FLR \
                        RACER_MAX_CLEANUP_WAIT=$RACER_MAX_CLEANUP_WAIT \
                        RACER_ENABLE_SEL=$RACER_ENABLE_SEL \
+                       LOV_MAX_STRIPE_COUNT=$LOV_MAX_STRIPE_COUNT \
+                       RACER_ENABLE_OVERSTRIPE=$RACER_ENABLE_OVERSTRIPE \
+                       RACER_LOV_MAX_STRIPECOUNT=$RACER_LOV_MAX_STRIPECOUNT \
                        RACER_EXTRA=$RACER_EXTRA \
                        RACER_EXTRA_LAYOUT=\\\"$RACER_EXTRA_LAYOUT\\\" \
                        RACER_PROGS=$RACER_PROGS \
index 78d68e5..adde78b 100755 (executable)
@@ -4,6 +4,8 @@ RACER_ENABLE_PFL=${RACER_ENABLE_PFL:-true}
 RACER_ENABLE_DOM=${RACER_ENABLE_DOM:-true}
 RACER_ENABLE_FLR=${RACER_ENABLE_FLR:-true}
 RACER_ENABLE_SEL=${RACER_ENABLE_SEL:-true}
+RACER_ENABLE_OVERSTRIPE=${RACER_ENABLE_OVERSTRIPE:-true}
+RACER_LOV_MAX_STRIPECOUNT=${RACER_LOV_MAX_STRIPECOUNT:-$LOV_MAX_STRIPE_COUNT}
 RACER_EXTRA_LAYOUT=${RACER_EXTRA_LAYOUT:-""}
 DIR=$1
 MAX=$2
@@ -30,19 +32,22 @@ while /bin/true; do
        file=$((RANDOM % MAX))
        # $RANDOM is between 0 and 32767, and we want $blockcount in 64kB units
        blockcount=$((RANDOM * MAX_MB / 32 / 64))
-       stripecount=$((RANDOM % (OSTCOUNT + 1)))
+       $RACER_ENABLE_OVERSTRIPE &&
+               stripecount="-C $((RANDOM %
+                       (RACER_LOV_MAX_STRIPECOUNT +  1)))" ||
+               stripecount="-c $((RANDOM % (OSTCOUNT + 1)))"
 
-       [ $stripecount -gt 0 ] && {
+       [ ${stripecount:2} -gt 0 ] && {
                stripesize=$(((1 << (RANDOM % 5)) * 64))K
                comp_end=$((${stripesize%K} * (RANDOM % 8 + 1)))K
                pattern=${layout[$RANDOM % ${#layout[*]}]}
 
                case $pattern in
-               dom) opt="setstripe -E $stripesize -L mdt -E eof -c $stripecount -S 1M" ;;
-               pfl) opt="setstripe -E $comp_end -S $stripesize -E eof -c $stripecount -S 2M" ;;
-               flr) opt="mirror create -N2 -E $comp_end -S $stripesize -E eof -c $stripecount -S 2M" ;;
-               sel) opt="setstripe -E 128M -S $stripesize -z 64M -E eof -c $stripecount -S 2M -z 128M" ;;
-               raid0) opt="setstripe -S $stripesize -c $stripecount" ;;
+               dom) opt="setstripe -E $stripesize -L mdt -E eof $stripecount -S 1M" ;;
+               pfl) opt="setstripe -E $comp_end -S $stripesize -E eof $stripecount -S 2M" ;;
+               flr) opt="mirror create -N2 -E $comp_end -S $stripesize -E eof $stripecount -S 2M" ;;
+               sel) opt="setstripe -E 128M -S $stripesize -z 64M -E eof $stripecount -S 2M -z 128M" ;;
+               raid0) opt="setstripe -S $stripesize $stripecount" ;;
                extra) opt="setstripe $RACER_EXTRA_LAYOUT" ;;
                esac