tripleo-heat-templates/deployment/neutron/neutron-cleanup
Dan Prince d1fea280f4 step2: flatten the neutron service configurations
This change combines the previous puppet and docker files into a single
file that performs the docker service installation and configuration
for the neutron-metadata, neutron-ovs-agent, and neutron-ovs-dpdk-agent.

With this patch the baremetal version of each respective neutron service
has been removed.

Related-Blueprint: services-yaml-flattening

Change-Id: I7a918e72ce4bfd06a95d7a575603a6fb65ded5a9
2019-02-04 07:56:02 -05:00

28 lines
901 B
Bash
Executable File

#!/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 port in `ovs-vsctl list-ports ${INT_BRIDGE:-"br-int"}`;
do
skip_cleanup=`ovs-vsctl --if-exists get Interface $port external_ids:skip_cleanup`
if ! [[ "x$skip_cleanup" == "x\"true\"" ]];
then
ovs-vsctl del-port ${INT_BRIDGE:-"br-int"} $port
fi
done
ovs-vsctl --if-exists del-br ${TUN_BRIDGE:-"br-tun"}
# 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