diff --git a/devstack/lib/ovn_agent b/devstack/lib/ovn_agent index 00545f559f3..3e989c9742f 100644 --- a/devstack/lib/ovn_agent +++ b/devstack/lib/ovn_agent @@ -19,8 +19,8 @@ # There are some ovs functions OVN depends on that must be sourced from # the ovs neutron plugins. After doing this, the OVN overrides must be # re-sourced. -source $TOP_DIR/lib/neutron_plugins/ovs_base -source $TOP_DIR/lib/neutron_plugins/openvswitch_agent +source ${TOP_DIR}/lib/neutron_plugins/ovs_base +source ${TOP_DIR}/lib/neutron_plugins/openvswitch_agent # Defaults @@ -412,9 +412,6 @@ function compile_ovn { local prefix=$2 local localstatedir=$3 - # First, compile OVS - _compile_ovs $build_modules - if [ -n "$prefix" ]; then prefix="--prefix=$prefix" fi @@ -476,10 +473,9 @@ function install_ovn { remove_ovs_packages sudo rm -f $OVS_RUNDIR/* + compile_ovs $OVN_BUILD_MODULES if use_new_ovn_repository; then compile_ovn $OVN_BUILD_MODULES - else - compile_ovs $OVN_BUILD_MODULES fi sudo mkdir -p $OVS_RUNDIR diff --git a/roles/configure_functional_tests/tasks/main.yaml b/roles/configure_functional_tests/tasks/main.yaml index f59d5c1496b..9a4efe4503c 100644 --- a/roles/configure_functional_tests/tasks/main.yaml +++ b/roles/configure_functional_tests/tasks/main.yaml @@ -10,10 +10,15 @@ PROJECT_NAME={{ project_name }} NEUTRON_PATH={{ neutron_dir }} DEVSTACK_PATH={{ devstack_dir }} + TOP_DIR={{ devstack_dir }} VENV={{ tests_venv }} + STACK_USER=stack + OVS_BRANCH={{ OVS_BRANCH }} + OVN_BRANCH={{ OVN_BRANCH }} source $DEVSTACK_PATH/functions source $NEUTRON_PATH/devstack/lib/ovs + source $NEUTRON_PATH/devstack/lib/ovn_agent source $NEUTRON_PATH/tools/configure_for_func_testing.sh configure_host_for_func_testing diff --git a/tools/configure_for_func_testing.sh b/tools/configure_for_func_testing.sh index f124bdf2935..c200467d109 100755 --- a/tools/configure_for_func_testing.sh +++ b/tools/configure_for_func_testing.sh @@ -63,6 +63,8 @@ INSTALL_MYSQL_ONLY=${INSTALL_MYSQL_ONLY:-False} # The gate should automatically install dependencies. INSTALL_BASE_DEPENDENCIES=${INSTALL_BASE_DEPENDENCIES:-$IS_GATE} BUILD_OVS_FROM_SOURCE=${BUILD_OVS_FROM_SOURCE:-True} +OVN_BRANCH=${OVN_BRANCH:-master} +OVS_BRANCH=${OVS_BRANCH:-master} if [ ! -f "$DEVSTACK_PATH/stack.sh" ]; then @@ -81,7 +83,7 @@ function _init { TOP_DIR=$DEVSTACK_PATH if [ -f $DEVSTACK_PATH/local.conf ]; then - source $DEVSTACK_PATH/local.conf 2> /dev/null + source $DEVSTACK_PATH/local.conf 2> /dev/null || true fi source $DEVSTACK_PATH/stackrc @@ -109,9 +111,10 @@ function _install_base_deps { install_package $PACKAGES source $NEUTRON_PATH/devstack/lib/ovs - remove_ovs_packages - OVS_BRANCH="v2.12.0" + source $NEUTRON_PATH/devstack/lib/ovn_agent + echo_summary "OVN_BRANCH: ${OVN_BRANCH} OVS_BRANCH: ${OVS_BRANCH}" compile_ovs False /usr /var + compile_ovn False /usr /var else PACKAGES=$(get_packages general,neutron,q-agt,q-l3,openvswitch) PACKAGES=$(echo $PACKAGES | perl -pe 's|python-(?!dev)[^ ]*||g') diff --git a/zuul.d/base.yaml b/zuul.d/base.yaml index c5c200831ae..00afe65cefc 100644 --- a/zuul.d/base.yaml +++ b/zuul.d/base.yaml @@ -18,6 +18,9 @@ - ^neutron/locale/.*$ - ^releasenotes/.*$ vars: + OVN_BRANCH: v20.03.0 + # TODO(jlibosva): v2.13.0 is incompatible with kernel 4.15.0, sticking to commit hash until new v2.13 tag is created. + OVS_BRANCH: 51e9479da62edb04a5be47a7655de75c299b9fa1 devstack_services: # Ignore any default set by devstack. Emit a "disable_all_services". base: false diff --git a/zuul.d/tempest-singlenode.yaml b/zuul.d/tempest-singlenode.yaml index 29ffad86344..4f86cf52f55 100644 --- a/zuul.d/tempest-singlenode.yaml +++ b/zuul.d/tempest-singlenode.yaml @@ -299,7 +299,8 @@ vars: devstack_localrc: OVN_BRANCH: v20.03.0 - OVS_BRANCH: v2.13.0 + # TODO(jlibosva): v2.13.0 is incompatible with kernel 4.15.0, sticking to commit hash until new v2.13 tag is created + OVS_BRANCH: 51e9479da62edb04a5be47a7655de75c299b9fa1 - job: name: neutron-ovn-tempest-ovs-release @@ -308,7 +309,8 @@ vars: devstack_localrc: OVN_BRANCH: v20.03.0 - OVS_BRANCH: v2.13.0 + # TODO(jlibosva): v2.13.0 is incompatible with kernel 4.15.0, sticking to commit hash until new v2.13 tag is created + OVS_BRANCH: 51e9479da62edb04a5be47a7655de75c299b9fa1 - job: name: neutron-ovn-tempest-ovs-master-fedora