diff --git a/ds-collector-tests/cluster-dse-k8s.make b/ds-collector-tests/cluster-dse-k8s.make index d8375ab..d8b83fb 100755 --- a/ds-collector-tests/cluster-dse-k8s.make +++ b/ds-collector-tests/cluster-dse-k8s.make @@ -21,7 +21,7 @@ ${TESTS}: test_%: ./collector/ds-collector -T -p -f /tmp/datastax/test-collector-dse-k8s.conf -n cluster2-dc1-default-sts-0 ./collector/ds-collector -X -f /tmp/datastax/test-collector-dse-k8s.conf -n cluster2-dc1-default-sts-0 if ! ls /tmp/datastax/ | grep -q ".tar.gz" ; then echo "Failed to generate artefacts in the K8s cluster "; ls -l /tmp/datastax/ ; exit 1 ; fi - for f in $(ls /tmp/datastax/*.tar.gz) ; do if ! tar -xf $f ; then echo "Failed to untar artefact $f in the K8s cluster " ; exit 1 ; fi ; done + for f in $$(ls /tmp/datastax/ | grep ".tar.gz") ; do if ! tar -xf /tmp/datastax/$$f ; then echo "Failed to untar artefact $$f in the k8s cluster " ; exit 1 ; fi ; done setup: diff --git a/ds-collector-tests/cluster-one-node-vanilla-ssh-docker.make b/ds-collector-tests/cluster-one-node-vanilla-ssh-docker.make index 6850b55..3a4c8b1 100755 --- a/ds-collector-tests/cluster-one-node-vanilla-ssh-docker.make +++ b/ds-collector-tests/cluster-one-node-vanilla-ssh-docker.make @@ -17,14 +17,16 @@ ${TESTS_SSH}: test_ssh_%: docker exec -t ds-collector-tests_bastion_1 /collector/ds-collector -T -p -f /ds-collector-tests/$* -n ds-collector-tests_cassandra-00_1 docker exec -t ds-collector-tests_bastion_1 /collector/ds-collector -X -f /ds-collector-tests/$* -n ds-collector-tests_cassandra-00_1 # test archives exist - if ! ( docker exec ds-collector-tests_bastion_1 ls /tmp/datastax/ ) | grep -q ".tar.gz" ; then echo "Failed to generate artefacts in the SSH cluster" ; ( docker exec ds-collector-tests_bastion_1 ls /tmp/datastax/ ) ; exit 1 ; fi + if ! ( docker exec ds-collector-tests_bastion_1 ls $$(grep -oP '^bastionBaseDir="\K[^"]+' $* || echo "/tmp/datastax")/ ) | grep -q ".tar.gz" ; then echo "Failed to generate artefacts in the SSH cluster" ; ( docker exec ds-collector-tests_bastion_1 ls $$ + for f in $$(ls $$(grep -oP '^bastionBaseDir="\K[^"]+' $* || echo "/tmp/datastax") | grep ".tar.gz") ; do if ! tar -xf $$(grep -oP '^bastionBaseDir="\K[^"]+' $* || echo "/tmp/datastax")/$$f ; then echo "Failed to untar artefact $$f in the ssh cluster" ; exit 1 ; fi ; done(grep -oP '^bastionBaseDir="\K[^"]+' $* || echo "/tmp/datastax")/ ) ; exit 1 ; fi # ds-collector over SSH with verbose mode @echo "\n Testing SSH verbose $* \n" docker exec -t ds-collector-tests_bastion_1 /collector/ds-collector -v -T -f /ds-collector-tests/$* -n ds-collector-tests_cassandra-00_1 docker exec -t ds-collector-tests_bastion_1 /collector/ds-collector -v -T -p -f /ds-collector-tests/$* -n ds-collector-tests_cassandra-00_1 docker exec -t ds-collector-tests_bastion_1 /collector/ds-collector -v -X -f /ds-collector-tests/$* -n ds-collector-tests_cassandra-00_1 # test archives exist - if ! ( docker exec ds-collector-tests_bastion_1 ls /tmp/datastax/ ) | grep -q ".tar.gz" ; then echo "Failed to generate artefacts in the SSH cluster" ; ( docker exec ds-collector-tests_bastion_1 ls /tmp/datastax/ ) ; exit 1 ; fi + if ! ( docker exec ds-collector-tests_bastion_1 ls $$(grep -oP '^bastionBaseDir="\K[^"]+' $* || echo "/tmp/datastax")/ ) | grep -q ".tar.gz" ; then echo "Failed to generate artefacts in the SSH cluster" ; ( docker exec ds-collector-tests_bastion_1 $$(grep -oP '^bastionBaseDir="\K[^"]+' $* || echo "/tmp/datastax")/ ) ; exit 1 ; fi + for f in $$(ls $$(grep -oP '^bastionBaseDir="\K[^"]+' $* || echo "/tmp/datastax") | grep ".tar.gz") ; do if ! tar -xf $$(grep -oP '^bastionBaseDir="\K[^"]+' $* || echo "/tmp/datastax")/$$f ; then echo "Failed to untar artefact $$f in the ssh cluster" ; exit 1 ; fi ; done ${TESTS_DOCKER}: test_docker_%: # ds-collector over docker @@ -38,6 +40,8 @@ ${TESTS_DOCKER}: test_docker_%: ./collector/ds-collector -X -f $* -n ds-collector-tests_cassandra-00_1 # test archives exist if ! ls /tmp/datastax/ | grep -q ".tar.gz" ; then echo "Failed to generate artefacts in the docker cluster " ; ls -l /tmp/datastax/ ; exit 1 ; fi + # a non-root user on the host might not be able to untar special files, so just list the tarfile contents instead + for f in $$(ls /tmp/datastax/ | grep ".tar.gz") ; do if ! tar -xf /tmp/datastax/$$f ; then echo "Failed to untar artefact $f in the docker cluster " ; exit 1 ; fi ; done setup: diff --git a/ds-collector-tests/cluster-vanilla-k8s.make b/ds-collector-tests/cluster-vanilla-k8s.make index 0074631..84a7b93 100755 --- a/ds-collector-tests/cluster-vanilla-k8s.make +++ b/ds-collector-tests/cluster-vanilla-k8s.make @@ -18,7 +18,7 @@ ${TESTS}: test_%: ./collector/ds-collector -T -p -f /tmp/datastax/test-collector-k8s.conf -n cluster1-dc1-default-sts-0 ./collector/ds-collector -X -f /tmp/datastax/test-collector-k8s.conf -n cluster1-dc1-default-sts-0 if ! ls /tmp/datastax/ | grep -q ".tar.gz" ; then echo "Failed to generate artefacts in the K8s cluster " ; ls -l /tmp/datastax/ ; exit 1 ; fi - for f in $(ls /tmp/datastax/*.tar.gz) ; do if ! tar -xf $f ; then echo "Failed to untar artefact $f in the K8s cluster " ; exit 1 ; fi ; done + for f in $$(ls /tmp/datastax/ | grep ".tar.gz") ; do if ! tar -xf /tmp/datastax/$$f ; then echo "Failed to untar artefact $$f in the k8s cluster " ; exit 1 ; fi ; done setup: diff --git a/ds-collector-tests/cluster-vanilla-ssh-docker.make b/ds-collector-tests/cluster-vanilla-ssh-docker.make index fb5848a..4d47152 100755 --- a/ds-collector-tests/cluster-vanilla-ssh-docker.make +++ b/ds-collector-tests/cluster-vanilla-ssh-docker.make @@ -16,17 +16,17 @@ ${TESTS_SSH}: test_ssh_%: docker exec -t ds-collector-tests_bastion_1 /collector/ds-collector -T -f /ds-collector-tests/$* -n ds-collector-tests_cassandra-00_1 docker exec -t ds-collector-tests_bastion_1 /collector/ds-collector -T -p -f /ds-collector-tests/$* -n ds-collector-tests_cassandra-00_1 docker exec -t ds-collector-tests_bastion_1 /collector/ds-collector -X -f /ds-collector-tests/$* -n ds-collector-tests_cassandra-00_1 - # test archives exist - if ! ( docker exec ds-collector-tests_bastion_1 ls /tmp/datastax/ ) | grep -q ".tar.gz" ; then echo "Failed to generate artefacts in the SSH cluster" ; ( docker exec ds-collector-tests_bastion_1 ls /tmp/datastax/ ) ; exit 1 ; fi - for f in $(ls /tmp/datastax/*.tar.gz) ; do if ! tar -xf $f ; then echo "Failed to untar artefact $f in the ssh cluster " ; exit 1 ; fi ; done + # test ssh archives exist + if ! ( docker exec ds-collector-tests_bastion_1 ls $$(grep -oP '^bastionBaseDir="\K[^"]+' $* || echo "/tmp/datastax")/ ) | grep -q ".tar.gz" ; then echo "Failed to generate artefacts in the SSH cluster" ; ( docker exec ds-collector-tests_bastion_1 ls $$(grep -oP '^bastionBaseDir="\K[^"]+' $* || echo "/tmp/datastax")/ ) ; exit 1 ; fi + for f in $$(ls $$(grep -oP '^bastionBaseDir="\K[^"]+' $* || echo "/tmp/datastax") | grep ".tar.gz") ; do if ! tar -xf $$(grep -oP '^bastionBaseDir="\K[^"]+' $* || echo "/tmp/datastax")/$$f ; then echo "Failed to untar artefact $$f in the ssh cluster " ; exit 1 ; fi ; done # ds-collector over SSH with verbose mode @echo "\n Testing SSH verbose $* \n" docker exec -t ds-collector-tests_bastion_1 /collector/ds-collector -v -T -f /ds-collector-tests/$* -n ds-collector-tests_cassandra-00_1 docker exec -t ds-collector-tests_bastion_1 /collector/ds-collector -v -T -p -f /ds-collector-tests/$* -n ds-collector-tests_cassandra-00_1 docker exec -t ds-collector-tests_bastion_1 /collector/ds-collector -v -X -f /ds-collector-tests/$* -n ds-collector-tests_cassandra-00_1 - # test archives exist - if ! ( docker exec ds-collector-tests_bastion_1 ls /tmp/datastax/ ) | grep -q ".tar.gz" ; then echo "Failed to generate artefacts in the SSH cluster" ; ( docker exec ds-collector-tests_bastion_1 ls /tmp/datastax/ ) ; exit 1 ; fi - for f in $(ls /tmp/datastax/*.tar.gz) ; do if ! tar -xf $f ; then echo "Failed to untar artefact $f in the ssh cluster " ; exit 1 ; fi ; done + # test ssh verbose archives exist + if ! ( docker exec ds-collector-tests_bastion_1 ls $$(grep -oP '^bastionBaseDir="\K[^"]+' $* || echo "/tmp/datastax")/ ) | grep -q ".tar.gz" ; then echo "Failed to generate artefacts in the SSH cluster" ; ( docker exec ds-collector-tests_bastion_1 ls $$(grep -oP '^bastionBaseDir="\K[^"]+' $* || echo "/tmp/datastax")/ ) ; exit 1 ; fi + for f in $$(ls $$(grep -oP '^bastionBaseDir="\K[^"]+' $* || echo "/tmp/datastax") | grep ".tar.gz") ; do if ! tar -xf $$(grep -oP '^bastionBaseDir="\K[^"]+' $* || echo "/tmp/datastax")/$$f ; then echo "Failed to untar artefact $$f in the ssh cluster " ; exit 1 ; fi ; done ${TESTS_DOCKER}: test_docker_%: # ds-collector over docker @@ -38,9 +38,10 @@ ${TESTS_DOCKER}: test_docker_%: ./collector/ds-collector -T -f $* -n ds-collector-tests_cassandra-00_1 ./collector/ds-collector -T -p -f $* -n ds-collector-tests_cassandra-00_1 ./collector/ds-collector -X -f $* -n ds-collector-tests_cassandra-00_1 - # test archives exist + # test docker archives exist if ! ls /tmp/datastax/ | grep -q ".tar.gz" ; then echo "Failed to generate artefacts in the docker cluster " ; ls -l /tmp/datastax/ ; exit 1 ; fi - for f in $(ls /tmp/datastax/*.tar.gz) ; do if ! tar -xf $f ; then echo "Failed to untar artefact $f in the ssh cluster " ; exit 1 ; fi ; done + # a non-root user on the host might not be able to untar special files, so just list the tarfile contents instead + for f in $$(ls /tmp/datastax/ | grep ".tar.gz") ; do if ! tar -tf /tmp/datastax/$$f ; then echo "Failed to untar artefact $$f in the docker cluster " ; exit 1 ; fi ; done setup: diff --git a/ds-collector-tests/integration-bastion.docker b/ds-collector-tests/integration-bastion.docker index c43dd44..d2bc602 100644 --- a/ds-collector-tests/integration-bastion.docker +++ b/ds-collector-tests/integration-bastion.docker @@ -1,7 +1,7 @@ FROM ubuntu:latest ENV DEBIAN_FRONTEND=noninteractive -RUN apt-get update && apt-get install -y openssh-server locales sshpass procps ethtool netcat-traditional net-tools sysstat pciutils ntp ntpstat numactl lvm2 curl xxd iproute2 +RUN apt-get update && apt-get install -y git openssh-server locales sshpass procps ethtool netcat-traditional net-tools sysstat pciutils ntp ntpstat numactl lvm2 curl xxd iproute2 RUN mkdir /var/run/sshd @@ -17,4 +17,4 @@ ENV LANG en_US.UTF-8 ENV LANGUAGE en_US.UTF-8 ENV LC_ALL en_US.UTF-8 -CMD ["sleep", "infinity"] \ No newline at end of file +CMD ["sleep", "infinity"] diff --git a/ds-collector-tests/test-collector-ssh-baseDirs.conf b/ds-collector-tests/test-collector-ssh-baseDirs.conf new file mode 100644 index 0000000..d565aef --- /dev/null +++ b/ds-collector-tests/test-collector-ssh-baseDirs.conf @@ -0,0 +1,128 @@ +# +# tlp_collector configuration file +# +# + +# base cassandra log and configuration directories +# update if you aren't using the default directory +# +#logHome="/var/log/cassandra" +#configHome="/etc/cassandra" + +# When the Cassandra nodes are inside docker containers +# Use docker commands to connect to nodes instead of ssh +# hostFile and hostName settings then need to use docker container IDs +# +# It is typical to also `skipSudo=true` (see below) on docker containers. +# +#use_docker="true" + +# When the Cassandra nodes are inside kubernetes pods +# Use kubectl commands to connect to nodes instead of ssh +# hostFile and hostName settings then need to use k8s pod names +# +# It is typical to also `skipSudo=true` (see below) +# +#use_k8s="true" +#k8s_namespace="default" + +# base ssh options, do not override defaults +# without completing a connection test +# +#sshOptionHostkeyCheck="false" +#sshOptionAgentForwarding="true" +#sshOptionVerbose="false" +#sshOptionConnectTimeout="true" +#sshOptionConnectAttempts="true" + +# if an identity file to authenticate to the target nodes +# is needed, specify it in sshIdentity +# +#sshIdentity="" + +# if using password authentication for ssh and scp, specify +# it in sshPassword (requires sshpass command) +# +sshPassword="root" + +# add additional binary path if needed +# +addPath="/opt/java/openjdk/bin" + +# specify additional ssh options as needed for your environment +# complete a connection test before adding extra options +# +sshArgs="-tt" +#scpArgs="-tt" + +# if you want to specify a file containing a list of hosts +# use the qualified path to the list in hostFile +# +#hostFile="" + +# if you only have a single target node you want to collect from +# you can enter the connection details here +# setting a hostFile above will take precedence +# +#hostName="" + +# the user name to use when connecting to the target nodes(), +# the user should have sudo access. +# commenting userName will set the default to root +# +#userName="ubuntu" + +# the provided issue id to reference the artifacts +# a generic issueId will be generated if not provided here +# +issueId="TEST_DS_COLLECTOR-000" + +# the JMX port to connect to when when gathering metrics via JMX +# this will be the value that JMX_PORT is set to in the cassandra-env.sh file +# +#jmxPort="7199" +#jmxUsername="" +#jmxPassword="" + +# skip iostat and vmstat collection +# +#skipStat="true" + +# skip any calls that require sudo +# +#skipSudo="true" + +# skip pushing artifacts to s3 +# +skipS3="true" + +# uploads are encrypted by default +# +encrypt_uploads="false" + +# skip deleting artifact from central host after successful push to s3 +# this will keep a local copy of the artifact on the central host +# +keepArtifact="true" + +# s3 key +# default key provided, only use to override +# +#keyId="" +#keySecret="" + +# s3 auth +# default is to use s3Auth to upload +# + +# cqlsh authentication +# Used to extract the schema +#cqlshUsername="" +#cqlshPassword="" + +# cqlsh SSL encryption +# +#$cqlshSSL="false" + +baseDir="/tmp/datastax-different-directory" +bastionBaseDir="/tmp/datastax-yet-different-directory" diff --git a/ds-collector/collector.conf.in b/ds-collector/collector.conf.in index eb5d39f..de27bff 100644 --- a/ds-collector/collector.conf.in +++ b/ds-collector/collector.conf.in @@ -190,6 +190,12 @@ cqlsh_port=9042 # Note, unreachable nodes are automatically ignored. #skipNodes="" +# Where will collection tarballs (and log file) be saved on the bastion +#bastionBaseDir="/tmp/datastax" + +# Where will collector be copied to and the collection tarball be saved on each node +#baseDir="/tmp/datastax" + # Limit collection of log files to those with a modified timestamp newer than $logsMaxAgeDays days # By default we collect all log files newer than two months old to ensure thorough discovery analysis of nodes, @@ -199,4 +205,3 @@ cqlsh_port=9042 # Some deployments are tens to hundreds of GBs of logs kept on nodes, and this can become unweldly to upload. # When needed set to reduce to manageable size. #logsMaxAgeDays=61 - diff --git a/ds-collector/ds-collector b/ds-collector/ds-collector index 874b727..46d6819 100755 --- a/ds-collector/ds-collector +++ b/ds-collector/ds-collector @@ -167,11 +167,11 @@ list_cassandra_nodes_client() { # more accurate disk space check node_count="${#cassandraNodes[@]}" - required_basedir_space="$((${node_count} * 500000))" + required_bastionBaseDir_space="$((${node_count} * 500000))" # detect if df supports --portability DF_OPT="" ( ( df --help 2>/dev/null ) | grep -q "\-\-portability" ) && DF_OPT="--portability" - [ $(df $DF_OPT "$baseDir" | tail -n +2 | awk '{print $4}') -ge ${required_basedir_space} ] || { echo >&2 "A diagnostic collection of ${node_count} nodes requires at least $((${required_basedir_space} / 1000000))GB free at $baseDir"; exit 1; } + [ $(df $DF_OPT "${bastionBaseDir}" | tail -n +2 | awk '{print $4}') -ge ${required_bastionBaseDir_space} ] || { echo >&2 "A diagnostic collection of ${node_count} nodes requires at least $((${required_bastionBaseDir_space} / 1000000))GB free at ${bastionBaseDir}"; exit 1; } # also grab the cluster name cmd="set -o pipefail ; ${pathCommand} ${nodetoolCmd} -h ${jmxHost} -p ${jmxPort} ${jmxOpts} ${nodetoolCredentials} describecluster" @@ -277,9 +277,9 @@ node_connect_ssh() { bastion_checks() { echo "version: ${git_branch} ${git_sha}" # pre-conditions - mkdir -p $baseDir + mkdir -p ${bastionBaseDir} if [ "$?" != "0" ]; then - echo "we couldn't make our working directory: $baseDir...exiting" + echo "we couldn't make our working directory: ${bastionBaseDir}...exiting" exit 2 fi command -v ip >/dev/null 2>&1 || command -v ifconfig >/dev/null 2>&1 || { echo >&2 "ip or ifconfig needs to be installed"; exit 1; } @@ -306,7 +306,7 @@ bastion_checks() { # detect if df supports --portability DF_OPT="" ( ( df --help 2>/dev/null ) | grep -q "\-\-portability" ) && DF_OPT="--portability" - [ $(df $DF_OPT "$baseDir" | tail -n +2 | awk '{print $4}') -ge 1000000 ] || { echo >&2 "There must be at least 1GB free at $baseDir"; exit 1; } + [ $(df $DF_OPT "${bastionBaseDir}" | tail -n +2 | awk '{print $4}') -ge 1000000 ] || { echo >&2 "There must be at least 1GB free at ${bastionBaseDir}"; exit 1; } # revert the prometheus jarfile from text back to jarfile [[ -f "${script_directory}/${prometheus}" ]] || command -v xxd >/dev/null 2>&1 || { echo >&2 "xxd needs to be installed"; exit 1; } [[ -f "${script_directory}/${prometheus/jar/txt}" ]] || [[ -f "${script_directory}/${prometheus}" ]] || { echo >&2 "${prometheus/jar/txt} or ${prometheus} needs to be in the collector directory ${script_directory}"; exit 1; } @@ -349,7 +349,7 @@ print_status_state() { # shellcheck disable=SC2086 bucket_dump() { unset -v artifacts - artifacts=($baseDir/*artifacts*.tar.gz) + artifacts=(${bastionBaseDir}/*artifacts*.tar.gz) timestamp=$(date -u +"%Y-%m-%dT%H%M%S") @@ -358,10 +358,10 @@ bucket_dump() { baseMessage="processing artifact $artifact" encrypt_artifact "${artifact}" if [ "$skipS3" != "true" ]; then - s3_push_artifact "${baseDir}/${artifact}" "${timestamp}" + s3_push_artifact "${bastionBaseDir}/${artifact}" "${timestamp}" if [ "$statusState" = "0" ]; then if [ "$keepArtifact" != "true" ]; then - rm ${baseDir}/${artifact} + rm ${bastionBaseDir}/${artifact} fi else echo "upload of ${artifact} failed" @@ -496,7 +496,7 @@ create_complete_marker() { else completeFileName="collector_upload.incomplete" fi - completeFilePath="${baseDir}/${completeFileName}" + completeFilePath="${bastionBaseDir}/${completeFileName}" echo "Expected ${artifact_count} artifacts. Cluster has ${node_count} nodes." > "${completeFilePath}" echo "----" >> "${completeFilePath}" for hostName in ${cassandraNodes} ; do @@ -872,7 +872,7 @@ discover_jmx() { archive_artifacts() { baseMessage="archiving current artifacts" - cd "$baseDir" + cd "${baseDir}" if [ "$skipSudo" != "true" ]; then sudo chown -R "$(whoami)" "$artifactDir" fi @@ -911,7 +911,7 @@ halp() { -d Run script on a single node only, disabling auto discovery when the -n option specifies a hostname or IP address. Can only be used with Test Mode and Execute Mode. - -v Verbose mode. Also captures console stdout to a log file under ${baseDir} + -v Verbose mode. Also captures console stdout to a log file under ${bastionBaseDir} -h Print this help and exit. modes: @@ -1001,21 +1001,21 @@ node_pull() { } node_pull_docker() { - docker cp "$hostName:$1" "$baseDir/." + docker cp "$hostName:$1" "${bastionBaseDir}/." statusState=$? print_status_state return $statusState } node_pull_k8s() { - kubectl -n "$k8s_namespace" cp "$hostName:$1" $k8s_container_name_opt "$baseDir/$(basename $1)" + kubectl -n "$k8s_namespace" cp "$hostName:$1" $k8s_container_name_opt "${bastionBaseDir}/$(basename $1)" statusState=$? print_status_state return $statusState } node_pull_ssh() { - scp_command="scp $scpArgs $userName@${hostName}:${1} $baseDir/." + scp_command="scp $scpArgs $userName@${hostName}:${1} ${bastionBaseDir}/." if [ -n "$sshPassword" ]; then export SSHPASS="${sshPassword}" scp_command="sshpass -e $scp_command" @@ -1166,7 +1166,7 @@ get_info() { script_directory=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) date=$(date -u +'%Y_%m_%d_%H%M_%s') baseDir="/tmp/datastax" -artifactDir="$baseDir/$(hostname)_artifacts_$date" +bastionBaseDir="/tmp/datastax" artifactFile="latest_artifacts.txt" # 'timeout --foreground' option is not supported on RHEL 6 @@ -1289,6 +1289,8 @@ if [ "$configFile" ]; then read_config; fi +artifactDir="${baseDir}/$(hostname)_artifacts_$date" + set_ssh_options set_scp_options @@ -1304,7 +1306,7 @@ set_scp_options if [ $verbose ] ; then bastion_checks - logFile="${baseDir}/ds-collector-$(date -u +'%Y-%m-%d-%H-%M-%s').log" + logFile="${bastionBaseDir}/ds-collector-$(date -u +'%Y-%m-%d-%H-%M-%s').log" echo "debugging to ${logFile}" ( exec $0 ${@/-v/-x} ) 2>&1 | sed "s/${jmxPassword:-\*\*\*\*}/****/g" | sed "s/${cqlshPassword:-\*\*\*\*}/****/g" | tee "${logFile}" exit $? @@ -1315,7 +1317,7 @@ elif [ $testMode ]; then elif [ $executeMode ]; then bastion_checks # Delete existing artifacts before we generate new ones - rm -f $baseDir/*.tar.gz + rm -f ${bastionBaseDir}/*.tar.gz get_infos bucket_dump exit $?