From bcb15272695065cba6874b5c1a84ec22376ddeb3 Mon Sep 17 00:00:00 2001 From: dkhandel Date: Tue, 26 Jun 2018 12:09:21 +0530 Subject: Run playbook to copy the logs from server machines to tester Change-Id: I38e79e252862f8213f840cf9a4501c9bf2ca2e7c --- build-gluster-org/scripts/distributed-regression.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'build-gluster-org/scripts/distributed-regression.sh') 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 -- cgit