Fix tempest container post logging
Currently when podman tempest container tempest tests fails, it stores the exit status as fail and exit the run_tempest.sh script leading to not copying the stuff from tempest container to host. It decouples the step of copying and managing permission for tempest post log processing and run only when tempest run finishes with in a container. https://tree.taiga.io/project/tripleo-ci-board/task/819 Change-Id: I9c7f97f3aa97c0ea061ba6aeb125501bf3a1adbf
This commit is contained in:
parent
36f51a1b42
commit
cd7bb9bc8a
@ -13,14 +13,6 @@
|
||||
tempest_dstat_opt: '--dstat /var/log/extra/dstat-csv.log'
|
||||
when: dstat_result.stat.exists
|
||||
|
||||
- name: Set the proper permission for tempest directory and files
|
||||
file:
|
||||
dest: "{{ working_dir }}/tempest"
|
||||
owner: "{{ undercloud_user }}"
|
||||
group: "{{ undercloud_user }}"
|
||||
recurse: true
|
||||
become: true
|
||||
|
||||
- name: Copy stackviz static file to home directory
|
||||
shell: >
|
||||
cp -r "{{ working_dir }}/tempest/.stackviz/share/stackviz-html" "{{ working_dir }}/stackviz"
|
||||
|
@ -1,6 +1,21 @@
|
||||
---
|
||||
- ignore_errors: true
|
||||
when: tempest_format == 'container'
|
||||
block:
|
||||
- name: Set the proper permission for tempest directory and files
|
||||
file:
|
||||
dest: "/var/lib/tempestdata"
|
||||
owner: "{{ undercloud_user }}"
|
||||
group: "{{ undercloud_user }}"
|
||||
recurse: true
|
||||
become: true
|
||||
|
||||
- name: copy files from tempest container to home directory
|
||||
copy:
|
||||
src: "/var/lib/tempestdata/tempest"
|
||||
dest: "{{ working_dir }}"
|
||||
|
||||
- block:
|
||||
- name: Check for .stestr directory
|
||||
stat:
|
||||
path: "{{ working_dir }}/tempest/.stestr"
|
||||
|
@ -97,11 +97,5 @@ sudo $CONTAINER_BINARY run --net=host -i -v $TEMPEST_HOST_DATA:{{ tempest_data }
|
||||
{{ tempest_container_registry }}/{{ tempest_container_namespace }}:{{ tempest_container_tag }} \
|
||||
/usr/bin/bash -c 'set -e; {{ tempest_data }}/tempest_container.sh'
|
||||
|
||||
# Change permission of tempest workspace directory
|
||||
sudo chmod -R 777 $TEMPEST_HOST_DATA
|
||||
|
||||
# Copy tempest related data to tempest folder so that stackviz can use it
|
||||
cp -R $TEMPEST_HOST_DATA/tempest {{ working_dir }}
|
||||
|
||||
{% endif %}
|
||||
### --stop_docs
|
||||
|
Loading…
Reference in New Issue
Block a user