aboutsummaryrefslogtreecommitdiff
path: root/docker/common
diff options
context:
space:
mode:
authorSam Yaple <sam@yaple.net>2015-06-27 12:07:46 +0000
committerSam Yaple <sam@yaple.net>2015-06-27 16:39:34 +0000
commit62e02fdbf4a4f714d008943c4e5c8512a93807ed (patch)
treed511e0543c6187d38673bcedb257889180025c8d /docker/common
parenta48900bc1c13fcca782261a9b3015a3676791c53 (diff)
downloadkolla-62e02fdbf4a4f714d008943c4e5c8512a93807ed.tar.gz
kolla-62e02fdbf4a4f714d008943c4e5c8512a93807ed.zip
Partially revert thin neutron containers
Due to a revert in the Docker code, thin neutron containers do not work at this time. The neutron plugin agents do not need to exist in the same container as the other agents however. This allows for using either linuxbridge or openvswitch The docker commit that did the revert: https://github.com/docker/docker/commit/ff770d33cdee5ab4dc0bdeb06dcfea49aa72ab8e Closes-Bug: 1469307 Change-Id: Idf79c31c74c34b93f5a9bac49730aca49bbdb861
Diffstat (limited to 'docker/common')
-rwxr-xr-xdocker/common/neutron/neutron-dhcp-agent/start.sh11
-rwxr-xr-xdocker/common/neutron/neutron-l3-agent/start.sh11
2 files changed, 22 insertions, 0 deletions
diff --git a/docker/common/neutron/neutron-dhcp-agent/start.sh b/docker/common/neutron/neutron-dhcp-agent/start.sh
index c3056fdb4..37182ebca 100755
--- a/docker/common/neutron/neutron-dhcp-agent/start.sh
+++ b/docker/common/neutron/neutron-dhcp-agent/start.sh
@@ -79,5 +79,16 @@ dhcp-option-force=26,1450
log-facility=${NEUTRON_LOG_DIR}/neutron-dnsmasq.log
EOF
+# TODO: SamYaple remove this section for thin neutron containers
+# The reason we remove existing namespaces is because network namespaces don't
+# persist between container restarts because the network proc mountpoint dies
+# when the container mount namespace dies. The mountpoint in /run/netns does
+# persist however, and that is all we are cleaning up here.
+
+# Remove any existing qdhcp namespaces
+ip netns list | grep qdhcp | while read -r line ; do
+ ip netns delete $line
+done
+
# Start DHCP Agent
exec /usr/bin/neutron-dhcp-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/dhcp_agent.ini --config-dir /etc/neutron
diff --git a/docker/common/neutron/neutron-l3-agent/start.sh b/docker/common/neutron/neutron-l3-agent/start.sh
index 4780341fb..c4fb85205 100755
--- a/docker/common/neutron/neutron-l3-agent/start.sh
+++ b/docker/common/neutron/neutron-l3-agent/start.sh
@@ -76,5 +76,16 @@ elif [ "${USE_NAMESPACES}" == "true" ] ; then
"true"
fi
+# TODO: SamYaple remove this section for thin neutron containers
+# The reason we remove existing namespaces is because network namespaces don't
+# persist between container restarts because the network proc mountpoint dies
+# when the container mount namespace dies. The mountpoint in /run/netns does
+# persist however, and that is all we are cleaning up here.
+
+# Remove any existing qrouter namespaces
+ip netns list | grep qrouter | while read -r line ; do
+ ip netns delete $line
+done
+
# Start L3 Agent
exec /usr/bin/neutron-l3-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/l3_agent.ini --config-file /etc/neutron/fwaas_driver.ini --config-dir /etc/neutron