Collect openstack services logs after tempest run

Currently in packstack deployment, we are collecting logs
once the deployment finishes and then we run tempest tests and
collect tempest related logs.
If the tempest tests fails, we have no openstack services logs
with tempest api calls in service logs, it is very hard to find
out what is causing the failure.

Copying the openstack services logs just after tempest runs
finishes will more info about the failure.

It also disables the copy log operation once packstack
deployment finishes.

Change-Id: I5ab038a49eeabe564650894f50c3b51e33e93fd2
Signed-off-by: Chandan Kumar (raukadah) <chkumar@redhat.com>
This commit is contained in:
Chandan Kumar (raukadah) 2019-11-12 16:29:01 +05:30
parent 2c471c212f
commit ca28815acc
2 changed files with 16 additions and 1 deletions

View File

@ -2,11 +2,14 @@
vars:
test_demo_user: "{{ test_demo is defined }}"
tasks:
# Disable packstack logs copy once packstack deployment finishes
# packstack-integration-tempest role is inherited from
# x/packstack project
- name: Install packstack allinone
include_role:
import_role:
name: packstack-integration-tempest
environment:
COPY_LOGS: false
# setup-tempest-user, setup-stack-user and setup-devstack-source-dirs
# are inherited from openstack/devstack
- name: Setup Stack user

View File

@ -1,5 +1,17 @@
- hosts: all
tasks:
# Copy openstack logs once tempest run finishes
- name: Copy openstack services logs once tempest run finish
shell:
cmd: |
set -e
set -x
source ./tools/copy-logs.sh
recover_default_logs
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace/packstack'
environment: '{{ zuul }}'
- name: Create tempest directory in /tmp/logs
file:
path: /tmp/logs/tempest