Enable tempest.log in /var/log/tempest for container
* In CI, when tempest container is used, It is good to dump the logs in /var/log/tempest so that it would be easier to verify tempest container is used. * Introduced tempest_log_dir and tempest_log_file var to the validate-tempest-playbook Depends-On: https://review.openstack.org/#/c/566364/ Change-Id: Ifd72d902c623b3941a6c714e36b7cf104109a570
This commit is contained in:
parent
0c319a9ce0
commit
c570dd05e2
|
@ -31,6 +31,8 @@ Role Variables
|
||||||
* `tempestmail_config`: config.yaml - name of config file for tempestmail script
|
* `tempestmail_config`: config.yaml - name of config file for tempestmail script
|
||||||
* `tempestmail_log_server`: <string> - Server where the logs are saved
|
* `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_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
|
* `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
|
* `tempest_plugins`: list - List of openstack services tempest plugins to be
|
||||||
installed
|
installed
|
||||||
|
|
|
@ -30,6 +30,8 @@ tempest_dir: "{{ working_dir }}/tempest"
|
||||||
tempest_whitelist_file_src: "whitelist_file.j2"
|
tempest_whitelist_file_src: "whitelist_file.j2"
|
||||||
tempest_whitelist_file: "whitelist_file.conf"
|
tempest_whitelist_file: "whitelist_file.conf"
|
||||||
tempest_whitelist: []
|
tempest_whitelist: []
|
||||||
|
tempest_log_dir: "/var/log/tempest"
|
||||||
|
tempest_log_file: "tempest.log"
|
||||||
tempest_plugins: >-
|
tempest_plugins: >-
|
||||||
{% if release not in ['newton', 'ocata', 'pike'] -%}
|
{% if release not in ['newton', 'ocata', 'pike'] -%}
|
||||||
[ "python-keystone-tests-tempest", "python-neutron-tests-tempest" ]
|
[ "python-keystone-tests-tempest", "python-neutron-tests-tempest" ]
|
||||||
|
|
|
@ -6,6 +6,11 @@
|
||||||
sudo chmod -R 777 {{ tempest_dir }}
|
sudo chmod -R 777 {{ tempest_dir }}
|
||||||
when: tempest_format == 'container'
|
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
|
- name: Generate testrepository.subunit results file
|
||||||
shell: >
|
shell: >
|
||||||
set -o pipefail &&
|
set -o pipefail &&
|
||||||
|
|
|
@ -132,6 +132,10 @@ $TEMPESTCONF --out etc/tempest.conf \
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
--create \
|
--create \
|
||||||
|
{% if tempest_format == 'container' %}
|
||||||
|
DEFAULT.log_dir {{ tempest_log_dir }} \
|
||||||
|
DEFAULT.log_file {{ tempest_log_file }} \
|
||||||
|
{% endif %}
|
||||||
{% if release in ['newton', 'ocata', 'pike'] %}
|
{% if release in ['newton', 'ocata', 'pike'] %}
|
||||||
identity.uri $OS_AUTH_URL \
|
identity.uri $OS_AUTH_URL \
|
||||||
identity.admin_password $OS_PASSWORD \
|
identity.admin_password $OS_PASSWORD \
|
||||||
|
|
|
@ -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_whitelist_file }}:{{ working_dir }}/{{ tempest_whitelist_file }} \
|
||||||
-v {{ working_dir }}/{{ tempest_deployer_input_file }}:{{ working_dir }}/{{ tempest_deployer_input_file }} \
|
-v {{ working_dir }}/{{ tempest_deployer_input_file }}:{{ working_dir }}/{{ tempest_deployer_input_file }} \
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
-v /var/log/containers/tempest:{{ tempest_log_dir }} \
|
||||||
-v {{ tempest_dir }}:{{ tempest_dir }} \
|
-v {{ tempest_dir }}:{{ tempest_dir }} \
|
||||||
-v {{ working_dir }}/tempest_container.sh:{{ working_dir }}/tempest_container.sh \
|
-v {{ working_dir }}/tempest_container.sh:{{ working_dir }}/tempest_container.sh \
|
||||||
{% if not 'http' in tempest_test_image_path %}
|
{% if not 'http' in tempest_test_image_path %}
|
||||||
|
|
Loading…
Reference in New Issue