From bedd24caff476c949bbd105a558f6ad2d4c5fa89 Mon Sep 17 00:00:00 2001 From: Slawek Kaplonski Date: Tue, 23 Nov 2021 11:35:53 +0100 Subject: [PATCH] [Fullstack] Don't install OVN in the fullstack job It's not needed at all so if we avoid installation, especially from sources, it may save us few minutes of the job's execution time. It may also save some resources on the node. To save a bit more time in the fullstack job's execution this patch also disables compilation of the OVS from source in that job. We can use OVS installed from packages provided by the distro instead. Change-Id: Ic4b6740671e51f0d306967013e3d500f4d0cd6a5 --- roles/configure_functional_tests/tasks/main.yaml | 2 ++ tools/configure_for_func_testing.sh | 8 ++++++-- zuul.d/base.yaml | 4 ++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/roles/configure_functional_tests/tasks/main.yaml b/roles/configure_functional_tests/tasks/main.yaml index 13887f5b90d..5e7888c84a1 100644 --- a/roles/configure_functional_tests/tasks/main.yaml +++ b/roles/configure_functional_tests/tasks/main.yaml @@ -15,6 +15,8 @@ STACK_USER=stack OVS_BRANCH={{ OVS_BRANCH }} OVN_BRANCH={{ OVN_BRANCH }} + BUILD_OVS_FROM_SOURCE={{ BUILD_OVS_FROM_SOURCE }} + INSTALL_OVN={{ INSTALL_OVN }} # This is DB USER used in e.g. pgsql db DATABASE_USER=openstack_citest diff --git a/tools/configure_for_func_testing.sh b/tools/configure_for_func_testing.sh index 99283f3aed4..d9045e1b143 100755 --- a/tools/configure_for_func_testing.sh +++ b/tools/configure_for_func_testing.sh @@ -65,6 +65,7 @@ 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} +INSTALL_OVN=${INSTALL_OVN:-True} OVN_BRANCH=${OVN_BRANCH:-main} OVS_BRANCH=${OVS_BRANCH:-master} @@ -112,9 +113,12 @@ function _install_base_deps { install_package $PACKAGES source $DEVSTACK_PATH/lib/neutron_plugins/ovn_agent - echo_summary "OVN_BRANCH: ${OVN_BRANCH} OVS_BRANCH: ${OVS_BRANCH}" + echo_summary "OVS_BRANCH: ${OVS_BRANCH}" compile_ovs False /usr /var - compile_ovn False /usr /var + if [[ "$INSTALL_OVN" == "True" ]]; then + echo_summary "OVN_BRANCH: ${OVN_BRANCH}" + compile_ovn False /usr /var + fi 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 969420bd9f4..2395d74a37e 100644 --- a/zuul.d/base.yaml +++ b/zuul.d/base.yaml @@ -27,6 +27,8 @@ - ^roles/.*$ - ^rally-jobs/.*$ vars: + BUILD_OVS_FROM_SOURCE: True + INSTALL_OVN: True OVN_BRANCH: v21.06.0 OVS_BRANCH: v2.16.0 devstack_services: @@ -49,6 +51,8 @@ parent: neutron-functional vars: tox_envlist: dsvm-fullstack-gate + BUILD_OVS_FROM_SOURCE: False + INSTALL_OVN: False zuul_copy_output: # We need to copy directory with logs to have it in job artifacts also, # /opt/stack/logs is default logs directory defined in neutron's