[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 <lucasagomes@gmail.com>
This commit is contained in:
Lucas Alvares Gomes 2021-01-15 09:26:44 +00:00
parent e2f574fb90
commit 8903d8c1e2

View File

@ -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