From 135daae62d8a05e6295c8ad2ddbe166d1418337b Mon Sep 17 00:00:00 2001 From: yatinkarel Date: Fri, 9 Dec 2022 11:06:55 +0530 Subject: [PATCH] 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 --- roles/configure_functional_tests/tasks/main.yaml | 11 +++++++---- tools/configure_for_func_testing.sh | 7 +++++-- zuul.d/base.yaml | 2 -- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/roles/configure_functional_tests/tasks/main.yaml b/roles/configure_functional_tests/tasks/main.yaml index 6f7f798d619..799db6998b3 100644 --- a/roles/configure_functional_tests/tasks/main.yaml +++ b/roles/configure_functional_tests/tasks/main.yaml @@ -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({})}}" diff --git a/tools/configure_for_func_testing.sh b/tools/configure_for_func_testing.sh index 29d514359a9..9c4f1179940 100755 --- a/tools/configure_for_func_testing.sh +++ b/tools/configure_for_func_testing.sh @@ -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 diff --git a/zuul.d/base.yaml b/zuul.d/base.yaml index 5b62854a9c5..3c07258bc26 100644 --- a/zuul.d/base.yaml +++ b/zuul.d/base.yaml @@ -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