summaryrefslogtreecommitdiffstats
path: root/build-gluster-org/scripts
diff options
context:
space:
mode:
authordkhandel <dkhandel@localhost.localdomain>2018-06-26 12:09:21 +0530
committerdkhandel <dkhandel@localhost.localdomain>2018-06-26 12:09:21 +0530
commitbcb15272695065cba6874b5c1a84ec22376ddeb3 (patch)
tree0fd7af4fac4cb09005d74ef5c72941621392c883 /build-gluster-org/scripts
parent4387e430761572eb59acc91a11610beee5b500d1 (diff)
Run playbook to copy the logs from server machines to tester
Change-Id: I38e79e252862f8213f840cf9a4501c9bf2ca2e7c
Diffstat (limited to 'build-gluster-org/scripts')
-rwxr-xr-xbuild-gluster-org/scripts/distributed-regression.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/build-gluster-org/scripts/distributed-regression.sh b/build-gluster-org/scripts/distributed-regression.sh
index 3fa15ee..ea86423 100755
--- a/build-gluster-org/scripts/distributed-regression.sh
+++ b/build-gluster-org/scripts/distributed-regression.sh
@@ -17,7 +17,7 @@ pip install pyrax ansible
for retry in $(seq 1 $MAX_ATTEMPTS)
do
- ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i hosts --private-key=key /opt/qa/distributed-tests/distributed-server.yml -u root
+ ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i hosts --private-key=key /opt/qa/distributed-tests/distributed-server.yml -u root --skip-tags 'copy_logs'
ret=$?
if [ $ret -eq 0 ]; then
break
@@ -29,11 +29,14 @@ done
/opt/qa/distributed-tests/run-distributed-test.py --n "${MACHINES_COUNT}"
ret=$?
+#copy the logs from machines before deleting
+ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i hosts --private-key=key /opt/qa/distributed-tests/distributed-server.yml -u root --tags 'copy_logs'
+
#delete the server machines
/opt/qa/distributed-tests/rackspace-server-manager.py delete
if [ $ret -ne 0 ]; then
# Create tar file from all the failed test log files generated in /tmp
- tar -czf "$WORKSPACE"/failed-tests-logs.tgz /tmp/*.log
+ tar -czf "$WORKSPACE"/failed-tests-logs.tgz /tmp/*.log /tmp/failed-tests
scp -o "UserKnownHostsFile=/dev/null" -o "StrictHostKeyChecking=no" -i "$LOG_KEY" failed-tests-logs.tgz "_logs-collector@http.int.rht.gluster.org:/var/www/glusterfs-logs/$JOB_NAME-logs-$BUILD_ID.tgz" || true;
echo "Failed tests logs stored in https://ci-logs.gluster.org/$JOB_NAME-logs-$BUILD_ID.tgz"
exit $ret