Whamcloud - gitweb
LU-13931 Revert "LU-13688 hsm: handle in-tree executed copytools correctly" 46/39746/3
authorOleg Drokin <green@whamcloud.com>
Thu, 27 Aug 2020 17:08:37 +0000 (17:08 +0000)
committerOleg Drokin <green@whamcloud.com>
Sun, 30 Aug 2020 00:36:50 +0000 (00:36 +0000)
This seems to break in-tree static build testing

This reverts commit 29bb063654c9a74d495e5d4cea17694a2b70f6a0.

Change-Id: I1bb04fe2a48b4d7392a1306bd16a5bab296af1f5
Reviewed-on: https://review.whamcloud.com/39746
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity-hsm.sh
lustre/tests/test-framework.sh

index 01f7e0a..15f9551 100755 (executable)
@@ -84,7 +84,7 @@ CLIENT2=${CLIENT2:-$CLIENT1}
 
 search_copytools() {
        local hosts=${1:-$(facet_active_host $SINGLEAGT)}
 
 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() {
 }
 
 wait_copytools() {
@@ -170,8 +170,8 @@ copytool_suspend() {
        local agents=${1:-$(facet_active_host $SINGLEAGT)}
 
        stack_trap \
        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"
 }
 
        echo "Copytool is suspended on $agents"
 }
 
@@ -489,7 +489,7 @@ get_agent_uuid() {
 
        # Lustre mount-point is mandatory and last parameter on
        # copytool cmd-line.
 
        # 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"
                       awk '{print $NF}')
        [ -n "$mntpnt" ] || error "Found no Agent or with no mount-point "\
                                  "parameter"
index aa320f2..41ac61e 100755 (executable)
@@ -10032,15 +10032,6 @@ init_agt_vars() {
        export HSMTOOL_EVENT_FIFO=${HSMTOOL_EVENT_FIFO:=""}
        export HSMTOOL_TESTDIR
 
        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
        HSM_ARCHIVE_NUMBER=2
 
        # The test only support up to 10 MDTs
@@ -10076,7 +10067,7 @@ get_mdt_devices() {
 copytool_continue() {
        local agents=${1:-$(facet_active_host $SINGLEAGT)}
 
 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"
 }
 
        echo "Copytool is continued on $agents"
 }
 
@@ -10084,7 +10075,7 @@ kill_copytools() {
        local hosts=${1:-$(facet_active_host $SINGLEAGT)}
 
        echo "Killing existing copytools on $hosts"
        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"
 }
 
        copytool_continue "$hosts"
 }
 
@@ -10140,7 +10131,7 @@ __lhsmtool_setup()
        cmd+=" \"$mountpoint\""
 
        echo "Starting copytool $facet on $(facet_host $facet)"
        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"
 }
 
        do_facet $facet "$cmd < /dev/null > \"$(copytool_logfile $facet)\" 2>&1"
 }