From: Henri Doreau Date: Fri, 6 Feb 2015 09:01:36 +0000 (+0100) Subject: LU-7073 tests: Add file migration to racer X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=92303f0c3317d0886f2b76dd5c6c45224b1d1cd2;p=fs%2Flustre-release.git LU-7073 tests: Add file migration to racer Make racer run both blocking and non-blocking "lfs migrate" commands. Implement this within the file_create.sh script, since it is already selecting among different layout types. Update Makefile.am to avoid listing every racer filename explicitly to make it easier to add new types of operations in the future. Lustre-change: https://review.whamcloud.com/c/fs/lustre-release/+/13669 Lustre-commit: e83569da38138859a51c660dfb5ca5bf45c70a37 Test-Parameters: trivial testlist=racer,racer,racer Test-Parameters: fstype=zfs testlist=racer,racer,racer Signed-off-by: Henri Doreau Signed-off-by: Jinshan Xiong Change-Id: I51b3f19c78029ff47102e96a71ec4a0fc472183a Reviewed-by: Andreas Dilger Reviewed-by: Zhenyu Xu Reviewed-by: Alex Deiter Signed-off-by: Minh Diep Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/52069 Tested-by: jenkins Tested-by: Maloo --- diff --git a/lustre/tests/Makefile.am b/lustre/tests/Makefile.am index 793e2e0..da3c019 100644 --- a/lustre/tests/Makefile.am +++ b/lustre/tests/Makefile.am @@ -48,13 +48,7 @@ noinst_SCRIPTS += hot-pools.sh nobase_noinst_SCRIPTS = cfg/local.sh nobase_noinst_SCRIPTS += test-groups/regression test-groups/regression-mpi nobase_noinst_SCRIPTS += acl/make-tree acl/run cfg/ncli.sh -nobase_noinst_SCRIPTS += racer/dir_create.sh racer/file_create.sh racer/file_list.sh -nobase_noinst_SCRIPTS += racer/file_rm.sh racer/racer.sh racer/file_concat.sh racer/file_exec.sh -nobase_noinst_SCRIPTS += racer/file_link.sh racer/file_rename.sh racer/file_symlink.sh -nobase_noinst_SCRIPTS += racer/dir_remote.sh racer/dir_migrate.sh racer/file_chmod.sh -nobase_noinst_SCRIPTS += racer/file_chown.sh racer/file_delxattr.sh racer/file_getxattr.sh -nobase_noinst_SCRIPTS += racer/file_mknod.sh racer/file_setxattr.sh racer/file_truncate.sh -nobase_noinst_SCRIPTS += racer/lss_create.sh racer/lss_destroy.sh +nobase_noinst_SCRIPTS += racer/*.sh nobase_noinst_SCRIPTS += posix/posix.cfg nobase_noinst_DATA = acl/cp.test acl/getfacl-noacl.test acl/inheritance.test nobase_noinst_DATA += acl/misc.test acl/permissions.test acl/setfacl.test diff --git a/lustre/tests/racer.sh b/lustre/tests/racer.sh index 699a0c3..156578d 100644 --- a/lustre/tests/racer.sh +++ b/lustre/tests/racer.sh @@ -66,6 +66,7 @@ RACER_ENABLE_REMOTE_DIRS=${RACER_ENABLE_REMOTE_DIRS:-false} RACER_ENABLE_STRIPED_DIRS=${RACER_ENABLE_STRIPED_DIRS:-false} RACER_ENABLE_MIGRATION=${RACER_ENABLE_MIGRATION:-false} RACER_ENABLE_SNAPSHOT=${RACER_ENABLE_SNAPSHOT:-true} +RACER_ENABLE_FILE_MIGRATE=${RACER_ENABLE_FILE_MIGRATE:-true} RACER_ENABLE_PFL=${RACER_ENABLE_PFL:-true} RACER_ENABLE_DOM=${RACER_ENABLE_DOM:-true} RACER_ENABLE_FLR=${RACER_ENABLE_FLR:-true} @@ -118,6 +119,7 @@ test_1() { RACER_ENABLE_REMOTE_DIRS=$RACER_ENABLE_REMOTE_DIRS \ RACER_ENABLE_STRIPED_DIRS=$RACER_ENABLE_STRIPED_DIRS \ RACER_ENABLE_MIGRATION=$RACER_ENABLE_MIGRATION \ + RACER_ENABLE_FILE_MIGRATE=$RACER_ENABLE_FILE_MIGRATE \ RACER_ENABLE_PFL=$RACER_ENABLE_PFL \ RACER_ENABLE_DOM=$RACER_ENABLE_DOM \ RACER_ENABLE_FLR=$RACER_ENABLE_FLR \ diff --git a/lustre/tests/racer/file_create.sh b/lustre/tests/racer/file_create.sh index dcd4033..43aad3c 100755 --- a/lustre/tests/racer/file_create.sh +++ b/lustre/tests/racer/file_create.sh @@ -43,6 +43,15 @@ while /bin/true; do raid0) opt="setstripe -S $stripesize -c $stripecount" ;; esac + if $RACER_ENABLE_FILE_MIGRATE && (( RANDOM % 20 == 0 )); then + if [ "$pattern" = "flr" ]; then + # LU-13730 crashes server when adding mirror + : # opt=${opt/create/extend} + else + opt=${opt/setstripe/migrate} + (( file % 8 == 0 )) && opt+=" --block" + fi + fi $LFS $opt $DIR/$file 2> /dev/null || true }