Removes existing network namespaces for neutron-agents container
Previously, network namespaces would not work correctly when restarting or stop/rm/start the neutron-agents container. This is because network namespaces created within the container are associated to the container's pid: /pid/$CONTAINER_PID/ns/net. With this patch, when a container starts or restarts, the l3/dhcp agent start scripts will remove any existing qrouter/qdhcp network namespaces before starting the agents. The agents will recreate the necessary network namespaces since they are stored in the db. Closes-Bug: 1444219 Change-Id: Ia86729766fe8c2fc145b3a02d519746b149a73bb
This commit is contained in:
parent
66fb5138db
commit
17fc2d9b47
@ -77,5 +77,10 @@ dhcp-option-force=26,1450
|
|||||||
log-facility=${NEUTRON_LOG_DIR}/neutron-dnsmasq.log
|
log-facility=${NEUTRON_LOG_DIR}/neutron-dnsmasq.log
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
# Remove any existing qdhcp namespaces
|
||||||
|
ip netns list | grep qdhcp | while read -r line ; do
|
||||||
|
ip netns delete $line
|
||||||
|
done
|
||||||
|
|
||||||
# Start DHCP Agent
|
# Start DHCP Agent
|
||||||
exec /usr/bin/neutron-dhcp-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/dhcp_agent.ini
|
exec /usr/bin/neutron-dhcp-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/dhcp_agent.ini
|
||||||
|
@ -76,5 +76,10 @@ elif [ "${USE_NAMESPACES}" == "true" ] ; then
|
|||||||
"true"
|
"true"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Remove any existing qrouter namespaces
|
||||||
|
ip netns list | grep qrouter | while read -r line ; do
|
||||||
|
ip netns delete $line
|
||||||
|
done
|
||||||
|
|
||||||
# Start L3 Agent
|
# 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
|
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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user