search_copytools() {
local hosts=${1:-$(facet_active_host $SINGLEAGT)}
- do_nodesv $hosts "pgrep -x $HSMTOOL_PKILL"
+ do_nodesv $hosts "libtool execute pgrep -x $HSMTOOL"
}
wait_copytools() {
local agents=${1:-$(facet_active_host $SINGLEAGT)}
stack_trap \
- "do_nodesv $agents pkill -CONT -x '$HSMTOOL_PKILL' || true" EXIT
- do_nodesv $agents "pkill -STOP -x $HSMTOOL_PKILL" || return 0
+ "do_nodesv $agents libtool execute pkill -CONT -x '$HSMTOOL' || true" EXIT
+ do_nodesv $agents "libtool execute pkill -STOP -x $HSMTOOL" || return 0
echo "Copytool is suspended on $agents"
}
# Lustre mount-point is mandatory and last parameter on
# copytool cmd-line.
- local mntpnt=$(do_rpc_nodes $agent ps -C $HSMTOOL_KILL -o args= |
+ local mntpnt=$(do_rpc_nodes $agent libtool execute ps -C $HSMTOOL -o args= |
awk '{print $NF}')
[ -n "$mntpnt" ] || error "Found no Agent or with no mount-point "\
"parameter"
export HSMTOOL_EVENT_FIFO=${HSMTOOL_EVENT_FIFO:=""}
export HSMTOOL_TESTDIR
- # Copytools invoked from within the source tree are executed through a
- # libtool script and have a different process name
- from_build_tree && LIBTOOL_PREFIX=lt-
-
- export HSMTOOL_KILL=${LIBTOOL_PREFIX}${HSMTOOL}
-
- # pgrep(1) and pkill(1) limit process name matching to 15 characters
- export HSMTOOL_PKILL=${HSMTOOL_KILL:0:15}
-
HSM_ARCHIVE_NUMBER=2
# The test only support up to 10 MDTs
copytool_continue() {
local agents=${1:-$(facet_active_host $SINGLEAGT)}
- do_nodesv $agents "pkill -CONT -x $HSMTOOL_PKILL" || return 0
+ do_nodesv $agents "libtool execute pkill -CONT -x $HSMTOOL" || return 0
echo "Copytool is continued on $agents"
}
local hosts=${1:-$(facet_active_host $SINGLEAGT)}
echo "Killing existing copytools on $hosts"
- do_nodesv $hosts "killall -q $HSMTOOL_KILL" || true
+ do_nodesv $hosts "libtool execute killall -q $HSMTOOL" || true
copytool_continue "$hosts"
}
cmd+=" \"$mountpoint\""
echo "Starting copytool $facet on $(facet_host $facet)"
- stack_trap "do_facet $facet pkill -x '$HSMTOOL_PKILL' || true" EXIT
+ stack_trap "do_facet $facet libtool execute pkill -x '$HSMTOOL' || true" EXIT
do_facet $facet "$cmd < /dev/null > \"$(copytool_logfile $facet)\" 2>&1"
}