Merge "Enable tempest.log in /var/log/tempest for container"

This commit is contained in:
Zuul 2018-05-21 23:40:15 +00:00 committed by Gerrit Code Review
commit 38409217e1
5 changed files with 14 additions and 0 deletions

View File

@ -31,6 +31,8 @@ Role Variables
* `tempestmail_config`: config.yaml - name of config file for tempestmail script
* `tempestmail_log_server`: <string> - Server where the logs are saved
* `tempest_track_resources`: true/false - whether to save the state of resources after tempest run (default: true)
* `tempest_log_dir`: <directory path> - The directory path where tempest log file is stored (default: /var/log/tempest)
* `tempest_log_file`: <file name> - The name of tempest log file (default: tempest.log)
* `check_tempest_bugs`: true/false - Will check every bugzilla and launchpad bug in the yaml skip file
* `tempest_plugins`: list - List of openstack services tempest plugins to be
installed

View File

@ -30,6 +30,8 @@ tempest_dir: "{{ working_dir }}/tempest"
tempest_whitelist_file_src: "whitelist_file.j2"
tempest_whitelist_file: "whitelist_file.conf"
tempest_whitelist: []
tempest_log_dir: "/var/log/tempest"
tempest_log_file: "tempest.log"
tempest_plugins: >-
{% if release not in ['newton', 'ocata', 'pike'] -%}
[ "python-keystone-tests-tempest", "python-neutron-tests-tempest" ]

View File

@ -6,6 +6,11 @@
sudo chmod -R 777 {{ tempest_dir }}
when: tempest_format == 'container'
- name: Change permission of tempest container log directory
shell: |
sudo chmod -R 777 /var/log/containers/tempest
when: tempest_format == 'container'
- name: Generate testrepository.subunit results file
shell: >
set -o pipefail &&

View File

@ -132,6 +132,10 @@ $TEMPESTCONF --out etc/tempest.conf \
{% endfor %}
{% endif %}
--create \
{% if tempest_format == 'container' %}
DEFAULT.log_dir {{ tempest_log_dir }} \
DEFAULT.log_file {{ tempest_log_file }} \
{% endif %}
{% if release in ['newton', 'ocata', 'pike'] %}
identity.uri $OS_AUTH_URL \
identity.admin_password $OS_PASSWORD \

View File

@ -48,6 +48,7 @@ sudo docker run -i -v $RCFILE:$RCFILE \
-v {{ working_dir }}/{{ tempest_whitelist_file }}:{{ working_dir }}/{{ tempest_whitelist_file }} \
-v {{ working_dir }}/{{ tempest_deployer_input_file }}:{{ working_dir }}/{{ tempest_deployer_input_file }} \
{% endif %}
-v /var/log/containers/tempest:{{ tempest_log_dir }} \
-v {{ tempest_dir }}:{{ tempest_dir }} \
-v {{ working_dir }}/tempest_container.sh:{{ working_dir }}/tempest_container.sh \
{% if not 'http' in tempest_test_image_path %}