This is an automated email from the ASF dual-hosted git repository.

mck pushed a commit to branch cassandra-5.0
in repository https://gitbox.apache.org/repos/asf/cassandra.git


The following commit(s) were added to refs/heads/cassandra-5.0 by this push:
     new fe7997884d Write ccm clusters under test's TMPDIR
fe7997884d is described below

commit fe7997884d88df4cc595044abb84b823a1fa03df
Author: Mick Semb Wever <m...@apache.org>
AuthorDate: Mon Dec 4 13:12:33 2023 +0100

    Write ccm clusters under test's TMPDIR
    
    This prevents docker overlay file leakage from containers by keeping 
write-heavy directories in bind mounts (or volumes). It also offers better 
performance by avoiding the container filesystem.
    
     patch by Mick Semb Wever; reviewed Brandon Williams for INFRA-25202
---
 .build/docker/_docker_run.sh   | 3 ++-
 .build/run-python-dtests.sh    | 3 ++-
 pylib/cassandra-cqlsh-tests.sh | 4 ++--
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/.build/docker/_docker_run.sh b/.build/docker/_docker_run.sh
index 12228d258f..659f5bacf3 100755
--- a/.build/docker/_docker_run.sh
+++ b/.build/docker/_docker_run.sh
@@ -128,7 +128,8 @@ docker exec --user root ${container_name} bash -c 
"\${CASSANDRA_DIR}/.build/dock
 docker exec --user build ${container_name} bash -c "${docker_command}"
 RETURN=$?
 
-docker stop ${container_name} >/dev/null
+# docker stop in background, ignore errors
+( nohup docker stop ${container_name} >/dev/null 2>/dev/null & )
 popd >/dev/null
 [ $RETURN -eq 0 ] && echo "Build directory found at ${build_dir}"
 exit $RETURN
diff --git a/.build/run-python-dtests.sh b/.build/run-python-dtests.sh
index 4b791e267d..3eb7a1aedb 100755
--- a/.build/run-python-dtests.sh
+++ b/.build/run-python-dtests.sh
@@ -45,16 +45,17 @@ DTEST_SPLIT_CHUNK="$2"
 [ "x${CASSANDRA_DTEST_DIR}" != "x" ] || 
CASSANDRA_DTEST_DIR="${CASSANDRA_DIR}/../cassandra-dtest"
 [ "x${DIST_DIR}" != "x" ] || DIST_DIR="${CASSANDRA_DIR}/build"
 
+export TMPDIR="$(mktemp -d ${DIST_DIR}/run-python-dtest.XXXXXX)"
 export PYTHONIOENCODING="utf-8"
 export PYTHONUNBUFFERED=true
 export CASS_DRIVER_NO_EXTENSIONS=true
 export CASS_DRIVER_NO_CYTHON=true
 export CCM_MAX_HEAP_SIZE="1024M"
 export CCM_HEAP_NEWSIZE="512M"
+export CCM_CONFIG_DIR="${TMPDIR}/.ccm"
 export NUM_TOKENS="16"
 #Have Cassandra skip all fsyncs to improve test performance and reliability
 export CASSANDRA_SKIP_SYNC=true
-export TMPDIR="$(mktemp -d ${DIST_DIR}/run-python-dtest.XXXXXX)"
 unset CASSANDRA_HOME
 
 # pre-conditions
diff --git a/pylib/cassandra-cqlsh-tests.sh b/pylib/cassandra-cqlsh-tests.sh
index 9f20213ce8..91730a363e 100755
--- a/pylib/cassandra-cqlsh-tests.sh
+++ b/pylib/cassandra-cqlsh-tests.sh
@@ -28,16 +28,16 @@ WORKSPACE=$1
 [ "x${WORKSPACE}" != "x" ] || WORKSPACE="$(readlink -f $(dirname "$0")/..)"
 [ "x${BUILD_DIR}" != "x" ] || BUILD_DIR="${WORKSPACE}/build"
 
+export TMPDIR="$(mktemp -d ${DIST_DIR}/run-python-dtest.XXXXXX)"
 export PYTHONIOENCODING="utf-8"
 export PYTHONUNBUFFERED=true
 export CASS_DRIVER_NO_EXTENSIONS=true
 export CASS_DRIVER_NO_CYTHON=true
 export CCM_MAX_HEAP_SIZE="2048M"
 export CCM_HEAP_NEWSIZE="200M"
-export CCM_CONFIG_DIR=${BUILD_DIR}/.ccm
+export CCM_CONFIG_DIR="${TMPDIR}/.ccm"
 export NUM_TOKENS="16"
 export CASSANDRA_DIR=${WORKSPACE}
-export TMPDIR="$(mktemp -d /tmp/run-python-dtest.XXXXXX)"
 
 java_version=$(java -version 2>&1 | awk -F '"' '/version/ {print $2}' | awk 
-F. '{print $1}')
 version=$(grep 'property\s*name=\"base.version\"' ${CASSANDRA_DIR}/build.xml 
|sed -ne 's/.*value=\"\([^"]*\)\".*/\1/p')


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to