From 7ba26f5cf97b39bd0ddb53248ae4676866c10824 Mon Sep 17 00:00:00 2001 From: Slawek Kaplonski Date: Thu, 17 Sep 2020 11:13:52 +0200 Subject: [PATCH] Add possibility to not compile ovs and ovn if that's disabled There is flag Q_BUILD_OVS_FROM_GIT which can be used to not compile ovs from source. But this wasn't respected in the ovn_agent's module in install_ovn function which was always installing from source ovn and ovs. We need to disable that e.g. on grenade jobs when new version is installed. Change-Id: I7d3f92365e880191dcfe7c618a6f79d5f741144f --- lib/neutron_plugins/ovn_agent | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/neutron_plugins/ovn_agent b/lib/neutron_plugins/ovn_agent index f647f85c3d..84df9181ea 100644 --- a/lib/neutron_plugins/ovn_agent +++ b/lib/neutron_plugins/ovn_agent @@ -28,6 +28,8 @@ source $NEUTRON_DIR/devstack/lib/ovs # Defaults # -------- +Q_BUILD_OVS_FROM_GIT=$(trueorfalse True Q_BUILD_OVS_FROM_GIT) + # Set variables for building OVN from source OVN_REPO=${OVN_REPO:-https://github.com/ovn-org/ovn.git} OVN_REPO_NAME=$(basename ${OVN_REPO} | cut -f1 -d'.') @@ -322,6 +324,11 @@ function ovn_sanity_check { # install_ovn() - Collect source and prepare function install_ovn { + if [[ "$Q_BUILD_OVS_FROM_GIT" == "False" ]]; then + echo "Installation of OVS from source disabled." + return 0 + fi + echo "Installing OVN and dependent packages" # Check the OVN configuration