On unstack : clean up network namespaces created by quantum
Also removes OVS ports
Fix Bug #1156837
Change-Id: Id4178c0a12a3ada76403a57a736a9c7a908d6a4a
diff --git a/lib/quantum b/lib/quantum
index dfd73e9..4d6793c 100644
--- a/lib/quantum
+++ b/lib/quantum
@@ -406,7 +406,14 @@
# cleanup_quantum() - Remove residual data files, anything left over from previous
# runs that a clean run would need to clean up
function cleanup_quantum() {
- :
+ if is_quantum_ovs_base_plugin; then
+ quantum_ovs_base_cleanup
+ fi
+
+ # delete all namespaces created by quantum
+ for ns in $(sudo ip netns list | grep -o -e qdhcp-[0-9a-f\-]* -e qrouter-[0-9a-f\-]*); do
+ sudo ip netns delete ${ns}
+ done
}
# _configure_quantum_common()
@@ -502,7 +509,6 @@
# for l3-agent, only use per tenant router if we have namespaces
Q_L3_ROUTER_PER_TENANT=$Q_USE_NAMESPACE
AGENT_L3_BINARY="$QUANTUM_DIR/bin/quantum-l3-agent"
- PUBLIC_BRIDGE=${PUBLIC_BRIDGE:-br-ex}
Q_L3_CONF_FILE=$QUANTUM_CONF_DIR/l3_agent.ini
cp $QUANTUM_DIR/etc/l3_agent.ini $Q_L3_CONF_FILE