Will delete the namespaces if there is only the loopback interface.
So if you create a router in neutron and then you delete all interfaces and you clear the gateway, you will end up with a router in the neutron database but not a namespace in the network node.
This is why neutron code should always check if the namespace really exists before trying to exec commands in the namespace.
The namespaces with only the loopback interfaces are purged by a cronjob automatically installed with the ubuntu packages:
Filename: /etc/cron. d/neutron- l3-agent- netns-cleanup
Content:
# vim: set filetype=crontab: neutron- netns-cleanup ] ; then /usr/bin/ neutron- netns-cleanup --config- file=/etc/ neutron/ neutron. conf --config- file=/etc/ neutron/ l3_agent. ini >/dev/null 2>&1; fi
# Periodically cleans Neutron's network namespaces on behalf of the Neutron
# L3 agent.
0 * * * * neutron if [ -x /usr/bin/
So basically this command:
/usr/bin/ neutron- netns-cleanup --config- file=/etc/ neutron/ neutron. conf --config- file=/etc/ neutron/ l3_agent. ini
Will delete the namespaces if there is only the loopback interface.
So if you create a router in neutron and then you delete all interfaces and you clear the gateway, you will end up with a router in the neutron database but not a namespace in the network node.
This is why neutron code should always check if the namespace really exists before trying to exec commands in the namespace.