Fix containerized tempest logic
We weren't testing containerized tempest in standalone job due the missing logic on tempest-setup.sh script. This patch adds the logic for when containerized tempest runs in standalone, copying the clouds.yaml file instead of the stackrc/undercloudrc and also maintain the logic when you execute tempest in the ovb, copying the rc file. This also ensures that /var/lib/tempestdata and /var/log/tempest directories exists in order to not fail the execution of containerized tempest. https://tree.taiga.io/project/tripleo-ci-board/issue/836 Depends-On: https://review.openstack.org/#/c/643212/ Change-Id: I90204150085a1c9b943f9e054c0420a8a5e66538 Related-Bug: 1819440
This commit is contained in:
@@ -21,7 +21,10 @@ tempest_config: true
|
|||||||
tempest_overcloud: true
|
tempest_overcloud: true
|
||||||
run_tempest: false
|
run_tempest: false
|
||||||
post_tempest: true
|
post_tempest: true
|
||||||
tempest_format: packages # venv or packages or container
|
|
||||||
|
# venv or packages or container
|
||||||
|
tempest_format: packages
|
||||||
|
|
||||||
tempest_container_registry: >-
|
tempest_container_registry: >-
|
||||||
{% if (undercloud_enable_tempest is defined) and undercloud_enable_tempest|bool -%}
|
{% if (undercloud_enable_tempest is defined) and undercloud_enable_tempest|bool -%}
|
||||||
{{ local_docker_registry_host }}:8787/{{ docker_registry_namespace }}
|
{{ local_docker_registry_host }}:8787/{{ docker_registry_namespace }}
|
||||||
|
@@ -6,3 +6,15 @@
|
|||||||
- name: Set tempestconf call
|
- name: Set tempestconf call
|
||||||
set_fact:
|
set_fact:
|
||||||
tempestconf: "/usr/bin/discover-tempest-config"
|
tempestconf: "/usr/bin/discover-tempest-config"
|
||||||
|
|
||||||
|
- name: Create /var/log/containers/tempest
|
||||||
|
file:
|
||||||
|
path: /var/log/containers/tempest
|
||||||
|
state: directory
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: Create /var/lib/tempestdata
|
||||||
|
file:
|
||||||
|
path: /var/lib/tempestdata
|
||||||
|
state: directory
|
||||||
|
become: true
|
||||||
|
@@ -69,11 +69,20 @@ virtualenv --system-site-packages {{ working_dir }}/tempest_git/.venv
|
|||||||
|
|
||||||
{% if tempest_format == "container" %}
|
{% if tempest_format == "container" %}
|
||||||
echo "========= Note: Executing tempest via a container =========="
|
echo "========= Note: Executing tempest via a container =========="
|
||||||
export RCFILE="{{ rc_file }}"
|
|
||||||
cat <<'EOF' > {{ working_dir }}/tempest_container.sh
|
cat <<'EOF' > {{ working_dir }}/tempest_container.sh
|
||||||
# Set the exit status for the command
|
# Set the exit status for the command
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# Load rc file or os_cloud file
|
||||||
|
|
||||||
|
{% if tempest_os_cloud == '' %}
|
||||||
|
source {{ rc_file_container }}
|
||||||
|
{% else %}
|
||||||
|
export OS_CLOUD="standalone"
|
||||||
|
cp -Rf /var/lib/tempest/.config ~/
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
# Get the list of tempest/-plugins rpms installed within a tempest container
|
# Get the list of tempest/-plugins rpms installed within a tempest container
|
||||||
# It will be useful for debugging and making sure at what commit
|
# It will be useful for debugging and making sure at what commit
|
||||||
# tempest/tempest plugins rpms are installed in the same.
|
# tempest/tempest plugins rpms are installed in the same.
|
||||||
@@ -105,12 +114,6 @@ popd
|
|||||||
## ::
|
## ::
|
||||||
export TEMPESTCONF="{{ tempestconf }}"
|
export TEMPESTCONF="{{ tempestconf }}"
|
||||||
|
|
||||||
{% if tempest_format == 'container' %}
|
|
||||||
source {{ rc_file_container }}
|
|
||||||
{% elif tempest_os_cloud == '' %}
|
|
||||||
source {{ rc_file }}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if tempest_overcloud|bool or tempest_os_cloud != '' %}
|
{% if tempest_overcloud|bool or tempest_os_cloud != '' %}
|
||||||
# Get public net id
|
# Get public net id
|
||||||
|
|
||||||
|
@@ -52,7 +52,10 @@ then
|
|||||||
sudo mkdir -p $TEMPEST_HOST_DATA
|
sudo mkdir -p $TEMPEST_HOST_DATA
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sudo cp $RCFILE \
|
sudo cp \
|
||||||
|
{% if tempest_os_cloud == '' %}
|
||||||
|
{{ rc_file }} \
|
||||||
|
{% endif %}
|
||||||
{% if skip_file_src != '' %}
|
{% if skip_file_src != '' %}
|
||||||
{{ working_dir }}/{{ skip_file }} \
|
{{ working_dir }}/{{ skip_file }} \
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -65,6 +68,10 @@ sudo cp $RCFILE \
|
|||||||
{{ working_dir }}/tempest_container.sh \
|
{{ working_dir }}/tempest_container.sh \
|
||||||
$TEMPEST_HOST_DATA
|
$TEMPEST_HOST_DATA
|
||||||
|
|
||||||
|
{% if tempest_os_cloud != '' %}
|
||||||
|
sudo cp -Rf {{ working_dir }}/.config $TEMPEST_HOST_DATA
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if release not in ['newton', 'ocata', 'pike', 'queens', 'rocky'] %}
|
{% if release not in ['newton', 'ocata', 'pike', 'queens', 'rocky'] %}
|
||||||
export CONTAINER_BINARY='podman'
|
export CONTAINER_BINARY='podman'
|
||||||
{% else %}
|
{% else %}
|
||||||
|
@@ -9,6 +9,7 @@
|
|||||||
- tripleo-standalone-scenarios-full
|
- tripleo-standalone-scenarios-full
|
||||||
check:
|
check:
|
||||||
jobs:
|
jobs:
|
||||||
|
- tripleo-ci-centos-7-standalone
|
||||||
- openstack-tox-linters
|
- openstack-tox-linters
|
||||||
gate:
|
gate:
|
||||||
queue: tripleo
|
queue: tripleo
|
||||||
|
Reference in New Issue
Block a user