Use same ovs/ovn versions in local test setups

Currently we using different defaults in CI and
local run, also defaults in local run using ovs
master branch which is broken currently. Let's
use same version by definining defaults in
configure_for_func_testing.sh rather than at job
level, jobs can override these only when really
needed.

Drop unneeded source of functions, this was wrongly
detecting ovs/ovn versions. Anything required
should be sourced as part of configure_for_func_testing.sh.

Related-Bug: #1999154
Change-Id: I04a2b0b974d11a525c850b1e641a19749dee93f6
This commit is contained in:
yatinkarel 2022-12-09 11:06:55 +05:30
parent 35ea844158
commit 135daae62d
3 changed files with 12 additions and 8 deletions

View File

@ -1,3 +1,9 @@
- name: Set optional env vars
set_fact:
override_env:
OVN_BRANCH: "{{ OVN_BRANCH | default(omit) }}"
OVS_BRANCH: "{{ OVS_BRANCH | default(omit) }}"
- shell:
cmd: |
set -e
@ -13,8 +19,6 @@
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 }}
MEMORY_TRACKER={{ MEMORY_TRACKER }}
INSTALL_OVN={{ INSTALL_OVN }}
@ -22,8 +26,6 @@
DATABASE_USER=openstack_citest
MYSQL_GATHER_PERFORMANCE={{ MYSQL_GATHER_PERFORMANCE | default(true) }}
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
@ -43,3 +45,4 @@
configure_host_for_func_testing
executable: /bin/bash
environment: "{{ override_env | default({})}}"

View File

@ -67,9 +67,12 @@ INSTALL_MYSQL_ONLY=${INSTALL_MYSQL_ONLY:-False}
# The gate should automatically install dependencies.
INSTALL_BASE_DEPENDENCIES=${INSTALL_BASE_DEPENDENCIES:-$IS_GATE}
INSTALL_OVN=${INSTALL_OVN:-True}
OVN_BRANCH=${OVN_BRANCH:-main}
OVN_BRANCH=${OVN_BRANCH:-v21.06.0}
Q_BUILD_OVS_FROM_GIT=${Q_BUILD_OVS_FROM_GIT:-True}
OVS_BRANCH=${OVS_BRANCH:-master}
# OVS_BRANCH needs to be updated along with OVN_BRANCH, ovs is
# being used as submodule in ovn repo, to get a working ovs
# version can use git submodule status command on ovn repo
OVS_BRANCH=${OVS_BRANCH:-a4b04276ab5934d087669ff2d191a23931335c87}
if [ ! -f "$DEVSTACK_PATH/stack.sh" ]; then

View File

@ -39,8 +39,6 @@
Q_BUILD_OVS_FROM_GIT: True
MEMORY_TRACKER: True
INSTALL_OVN: True
OVN_BRANCH: v21.06.0
OVS_BRANCH: "a4b04276ab5934d087669ff2d191a23931335c87"
devstack_services:
# Ignore any default set by devstack. Emit a "disable_all_services".
base: false