neutron/roles/configure_functional_tests/tasks/main.yaml
Slawek Kaplonski ddf0568f39 Make configure_for_func_testing compatible with e.g. Centos
This is basically revert of the [1] which was revert of the [2]
but now it should not break our CI jobs.

In the configure_for_func_testing script openvswitch is installed
from source. We need to set proper flag (Q_BUILD_OVS_FROM_GIT) which
is used in Devstack to tell Devstack to install it from source and
not from packages.

This patch also removes flag BUILD_OVS_FROM_SOURCE from the
configure_for_func_testing file as it was only used in that file
and was actually duplicating the Q_BUILD_OVS_FROM_GIT option used also
in Devstack.

[1] https://review.opendev.org/c/openstack/neutron/+/824750
[2] https://review.opendev.org/c/openstack/neutron/+/824750

Change-Id: I35715a047d23ed87312afd294cc898de7c164583
2022-01-17 12:32:04 +01:00

41 lines
1.3 KiB
YAML

- shell:
cmd: |
set -e
set -x
GATE_STACK_USER={{ ansible_user }}
IS_GATE=True
BASE_DIR={{ base_dir }}
GATE_DEST={{ gate_dest_dir }}
PROJECT_NAME={{ project_name }}
NEUTRON_DIR={{ neutron_dir }}
DEVSTACK_PATH={{ devstack_dir }}
TOP_DIR={{ devstack_dir }}
VENV={{ tests_venv }}
STACK_USER=stack
OVS_BRANCH={{ OVS_BRANCH }}
OVN_BRANCH={{ OVN_BRANCH }}
Q_BUILD_OVS_FROM_GIT={{ Q_BUILD_OVS_FROM_GIT }}
INSTALL_OVN={{ INSTALL_OVN }}
# This is DB USER used in e.g. pgsql db
DATABASE_USER=openstack_citest
source $DEVSTACK_PATH/functions
source $DEVSTACK_PATH/lib/neutron_plugins/ovn_agent
source $NEUTRON_DIR/tools/configure_for_func_testing.sh
if is_fedora; then
# NOTE(slqweq) Running functional job e.g. on Centos requires to
# have repo with rabbitmq-server and some other packages available
install_package centos-release-openstack-victoria
install_package iproute-tc haproxy keepalived
# NOTE(slaweq) On Fedora/CentOS systems make sure that SELinux is
# not in enforcing mode
sudo setenforce 0
fi
configure_host_for_func_testing
executable: /bin/bash