Skip to content

Commit

Permalink
Stop dstat at the end of a job
Browse files Browse the repository at this point in the history
We should stop the dstat process that was previously started in
toci_gate_test.sh, so that processes aren't left running from tripleo-ci
jobs.

Change-Id: I200fe5f99d371fdde3b20518ffd10197680d46dd
  • Loading branch information
slagle committed Feb 27, 2017
1 parent 03c3cdf commit e38da48
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions scripts/common_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -388,3 +388,6 @@ function subnodes_scp_deploy_env {
done
}

function stop_dstat {
ps axjf | grep bin/dstat | grep -v grep | awk '{print $2;}' | sudo xargs -t -n 1 -r kill
}
2 changes: 1 addition & 1 deletion toci_instack_oooq_multinode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export OOOQ_ARGS=" --working-dir ${OPT_WORKDIR} \

# TODO(sshnaidm): when collect-logs role will have the same functionality,
# replace postci function with this role (see in the end of file).
trap "exit_val=\$?; [ \$exit_val != 0 ] && echo ERROR DURING PREVIOUS COMMAND ^^^ && echo 'See postci.txt in the logs directory for debugging details'; postci \$exit_val 2>&1 | ts '%Y-%m-%d %H:%M:%S.000 |' > $WORKSPACE/logs/postci.log 2>&1" EXIT
trap "exit_val=\$?; [ \$exit_val != 0 ] && echo ERROR DURING PREVIOUS COMMAND ^^^ && echo 'See postci.txt in the logs directory for debugging details'; postci \$exit_val 2>&1 | ts '%Y-%m-%d %H:%M:%S.000 |' > $WORKSPACE/logs/postci.log 2>&1; stop_dstat" EXIT

mkdir -p $WORKSPACE/logs

Expand Down

0 comments on commit e38da48

Please sign in to comment.