8126573718
Neutron used to run a neutron-ovs-cleanup service on startup and shutdown to ensure clean configuration. Container specific version of the cleanup service is needed as we are no longer installing neutron packages in the overcloud image and the ordering dependencies of the legacy services are not suitable for containerized neutron deployments. Closes-Bug: #1786311 Change-Id: Iddd191f06b0a7cadb463abec7ef152c89fddb3cd
22 lines
675 B
Bash
22 lines
675 B
Bash
#!/bin/bash
|
|
# Cleanup neutron OVS bridges. To be called on startup to avoid
|
|
# "difficult-to-debug" issues with partially configured resources.
|
|
|
|
NEUTRON_OVS_CONF=/var/lib/config-data/puppet-generated/neutron/etc/neutron/plugins/ml2/openvswitch_agent.ini
|
|
|
|
if [ -e ${NEUTRON_OVS_CONF} ];
|
|
then
|
|
INT_BRIDGE=`crudini --get ${NEUTRON_OVS_CONF} ovs integration_bridge`
|
|
TUN_BRIDGE=`crudini --get ${NEUTRON_OVS_CONF} ovs tunnel_bridge`
|
|
fi
|
|
|
|
for br in ${INT_BRIDGE:-"br-int"} ${TUN_BRIDGE:-"br-tun"};
|
|
do
|
|
ovs-vsctl --if-exists del-br $br
|
|
done
|
|
|
|
# Clean up trunk port bridges
|
|
for br in $(ovs-vsctl list-br | egrep 'tbr-[0-9a-f\-]+'); do
|
|
ovs-vsctl --if-exists del-br $br
|
|
done
|