Whamcloud - gitweb
LU-16521 tests: racer should work without DNE 67/51267/4
authorAndreas Dilger <adilger@whamcloud.com>
Sat, 10 Jun 2023 13:36:38 +0000 (07:36 -0600)
committerOleg Drokin <green@whamcloud.com>
Mon, 7 Aug 2023 03:49:58 +0000 (03:49 +0000)
Don't assume there are multiple MDTs for the target directory
when running dir_migrate and dir_remote.  If only one MDT
(or none, if running on a non-Lustre directory for some reason),
just exit from these workloads instead of spewing errors.

Test-parameters: trivial testlist=sanityn
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I47cbe9de2c4f9afd79228b6a505dde023f2540e5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51267
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Alex Deiter <alex.deiter@gmail.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/racer/dir_migrate.sh
lustre/tests/racer/dir_remote.sh

index 9c21146..761dee7 100755 (executable)
@@ -5,7 +5,7 @@ DIR=$1
 MAX=$2
 
 MDTCOUNT=${MDSCOUNT:-$($LFS df $DIR 2> /dev/null | grep -c MDT)}
-while /bin/true ; do
+while (( MDTCOUNT > 1 )) ; do
        migrate_dir=$((RANDOM % MAX))
        file=$((RANDOM % MAX))
        mdt_idx=$((RANDOM % MDTCOUNT))
index 5e6f197..d815ec8 100755 (executable)
@@ -5,7 +5,7 @@ DIR=$1
 MAX=$2
 
 MDTCOUNT=${MDSCOUNT:-$($LFS df $DIR 2> /dev/null | grep -c MDT)}
-while /bin/true ; do
+while (( MDTCOUNT > 1 )) ; do
        remote_dir=$((RANDOM % MAX))
        file=$((RANDOM % MAX))
        mdt_idx=$((RANDOM % MDTCOUNT))