During copytool setup, we set --hsm-root with the archive root
path of $SINGLEAGT. However, when set --hsm-root explicitly via
"-h|--hsm-root", it should reset the hsm root with the specified
one. Otherwise, it will cuase sanity-pcc/test_3b failed.
Test-Parameters: clientcount=3 testlist=sanity-pcc,sanity-pcc,sanity-pcc
Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: Ida6c1ff7459548b068fd62ce315fe8075633b5fc
Signed-off-by: Yang Sheng <ys@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/47909
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
# Use default values
local facet=$SINGLEAGT
local mountpoint="${MOUNT2:-$MOUNT}"
- local hsm_root="${hsm_root:-$(hsm_root "$facet")}"
# Parse arguments
local fail_on_error=true
- local -a hsmtool_options=("--hsm-root=$hsm_root")
+ local -a hsmtool_options=()
local -a action_options=()
if [[ -n "$HSMTOOL_ARCHIVE_FORMAT" ]]; then
;;
-h|--hsm-root)
shift
- hsm_root="$1"
+ local hsm_root="$1"
;;
-b|--bwlimit)
shift
shift
done
+ local hsm_root="${hsm_root:-$(hsm_root "$facet")}"
+ hsmtool_options+=("--hsm-root=$hsm_root")
+
stack_trap "do_facet $facet rm -rf '$hsm_root'" EXIT
do_facet $facet mkdir -p "$hsm_root" ||
error "mkdir '$hsm_root' failed"