From 8903d8c1e211607ce6bf86ff974f90717e8e2cac Mon Sep 17 00:00:00 2001 From: Lucas Alvares Gomes Date: Fri, 15 Jan 2021 09:26:44 +0000 Subject: [PATCH] [OVN] Fix Fedora/CentOS OVN configuration When installing OVN from packages, the rpm for Fedora / CentOS pre set some configurations that conflicts with the post configuration done by DevStack. This patch fixes this problem by erasing the pre-set configuration from the packages and leaving it to DevStack to configure OVN for its use (just like we would do when compiling it from source). Change-Id: I9c18023c9aa79c0633748a6169f4f283e9d74ef0 Signed-off-by: Lucas Alvares Gomes --- lib/neutron_plugins/ovn_agent | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/neutron_plugins/ovn_agent b/lib/neutron_plugins/ovn_agent index b661f593a4..0a8ca9761f 100644 --- a/lib/neutron_plugins/ovn_agent +++ b/lib/neutron_plugins/ovn_agent @@ -529,6 +529,14 @@ function configure_ovn { fi fi + # Erase the pre-set configurations from packages. DevStack will + # configure OVS and OVN accordingly for its use. + if [[ "$OVN_BUILD_FROM_SOURCE" == "False" ]] && is_fedora; then + sudo truncate -s 0 /etc/openvswitch/default.conf + sudo truncate -s 0 /etc/sysconfig/openvswitch + sudo truncate -s 0 /etc/sysconfig/ovn + fi + # Metadata if is_service_enabled q-ovn-metadata-agent && is_service_enabled ovn-controller; then sudo install -d -o $STACK_USER $NEUTRON_CONF_DIR