Steps to reproduce, create a router and dont add any port.
The command 'neutron router-port-list' should return an empty set.
As soon as you create the router, the namespace qrouter-<uuid> is present on the network node, but after a while it is purged.
As soon as the namespace is not there anymore check the log file vpn-agent.log for the stacktrace.
When a router has no ports the namespace is deleted from the network node. However this brakes the router updates and the file vpn-agent.log is flooded with this traces:
Happens in Kilo. Cannot test on other releases.
Steps to reproduce, create a router and dont add any port.
The command 'neutron router-port-list' should return an empty set.
As soon as you create the router, the namespace qrouter-<uuid> is present on the network node, but after a while it is purged.
As soon as the namespace is not there anymore check the log file vpn-agent.log for the stacktrace.
When a router has no ports the namespace is deleted from the network node. However this brakes the router updates and the file vpn-agent.log is flooded with this traces:
2016-04-21 16:22:17.771 23382 TRACE neutron. agent.l3. router_ info Traceback (most recent call last): agent.l3. router_ info File "/usr/lib/ python2. 7/dist- packages/ neutron/ common/ utils.py" , line 343, in call agent.l3. router_ info return func(*args, **kwargs) agent.l3. router_ info File "/usr/lib/ python2. 7/dist- packages/ neutron/ agent/l3/ router_ info.py" , line 628, in process agent.l3. router_ info self._process_ internal_ ports() agent.l3. router_ info File "/usr/lib/ python2. 7/dist- packages/ neutron/ agent/l3/ router_ info.py" , line 404, in _process_ internal_ ports agent.l3. router_ info existing_devices = self._get_ existing_ devices( ) agent.l3. router_ info File "/usr/lib/ python2. 7/dist- packages/ neutron/ agent/l3/ router_ info.py" , line 328, in _get_existing_ devices agent.l3. router_ info ip_devs = ip_wrapper. get_devices( exclude_ loopback= True) agent.l3. router_ info File "/usr/lib/ python2. 7/dist- packages/ neutron/ agent/linux/ ip_lib. py", line 102, in get_devices agent.l3. router_ info log_fail_ as_error= self.log_ fail_as_ error agent.l3. router_ info File "/usr/lib/ python2. 7/dist- packages/ neutron/ agent/linux/ utils.py" , line 137, in execute agent.l3. router_ info raise RuntimeError(m) agent.l3. router_ info RuntimeError: agent.l3. router_ info Command: ['sudo', 'neutron-rootwrap', '/etc/neutron/ rootwrap. conf', 'ip', 'netns', 'exec', 'qrouter- 8fc0f640- 35bb-4d0b- bbbd-80c22be0e7 62', 'find', '/sys/class/net', '-maxdepth', '1', '-type', 'l', '-printf', '%f '] agent.l3. router_ info Exit code: 1 agent.l3. router_ info Stdin: agent.l3. router_ info Stdout: agent.l3. router_ info Stderr: Cannot open network namespace "qrouter- 8fc0f640- 35bb-4d0b- bbbd-80c22be0e7 62": No such file or directory agent.l3. router_ info agent.l3. router_ info agent.l3. agent [-] Failed to process compatible router '8fc0f640- 35bb-4d0b- bbbd-80c22be0e7 62' agent.l3. agent Traceback (most recent call last): agent.l3. agent File "/usr/lib/ python2. 7/dist- packages/ neutron/ agent/l3/ agent.py" , line 467, in _process_ router_ update agent.l3. agent self._process_ router_ if_compatible( router) agent.l3. agent File "/usr/lib/ python2. 7/dist- packages/ neutron/ agent/l3/ agent.py" , line 414, in _process_ router_ if_compatible agent.l3. agent self._process_ updated_ router( router) agent.l3. agent File "/usr/lib/ python2. 7/dist- packages/ neutron/ agent/l3/ agent.py" , line 428, in _process_ updated_ router agent.l3. agent ri.process(self) agent.l3. agent File "/usr/lib/ python2. 7/dist- packages/ neutron/ common/ utils.py" , line 346, in call agent.l3. agent self.logger(e) agent.l3. agent File "/usr/lib/ python2. 7/dist- packages/ oslo_utils/ excutils. py", line 85, in __exit__ agent.l3. agent six.reraise( self.type_ , self.value, self.tb) agent.l3. agent File "/usr/lib/ python2. 7/dist- packages/ neutron/ common/ utils.py" , line 343, in call agent.l3. agent return func(*args, **kwargs) agent.l3. agent File "/usr/lib/ python2. 7/dist- packages/ neutron/ agent/l3/ router_ info.py" , line 628, in process agent.l3. agent self._process_ internal_ ports() agent.l3. agent File "/usr/lib/ python2. 7/dist- packages/ neutron/ agent/l3/ router_ info.py" , line 404, in _process_ internal_ ports agent.l3. agent existing_devices = self._get_ existing_ devices( ) agent.l3. agent File "/usr/lib/ python2. 7/dist- packages/ neutron/ agent/l3/ router_ info.py" , line 328, in _get_existing_ devices agent.l3. agent ip_devs = ip_wrapper. get_devices( exclude_ loopback= True) agent.l3. agent File "/usr/lib/ python2. 7/dist- packages/ neutron/ agent/linux/ ip_lib. py", line 102, in get_devices agent.l3. agent log_fail_ as_error= self.log_ fail_as_ error agent.l3. agent File "/usr/lib/ python2. 7/dist- packages/ neutron/ agent/linux/ utils.py" , line 137, in execute agent.l3. agent raise RuntimeError(m) agent.l3. agent RuntimeError: agent.l3. agent Command: ['sudo', 'neutron-rootwrap', '/etc/neutron/ rootwrap. conf', 'ip', 'netns', 'exec', 'qrouter- 8fc0f640- 35bb-4d0b- bbbd-80c22be0e7 62', 'find', '/sys/class/net', '-maxdepth', '1', '-type', 'l', '-printf', '%f '] agent.l3. agent Exit code: 1 agent.l3. agent Stdin: agent.l3. agent Stdout: agent.l3. agent Stderr: Cannot open network namespace "qrouter- 8fc0f640- 35bb-4d0b- bbbd-80c22be0e7 62": No such file or directory agent.l3. agent agent.l3. agent
2016-04-21 16:22:17.771 23382 TRACE neutron.
2016-04-21 16:22:17.771 23382 TRACE neutron.
2016-04-21 16:22:17.771 23382 TRACE neutron.
2016-04-21 16:22:17.771 23382 TRACE neutron.
2016-04-21 16:22:17.771 23382 TRACE neutron.
2016-04-21 16:22:17.771 23382 TRACE neutron.
2016-04-21 16:22:17.771 23382 TRACE neutron.
2016-04-21 16:22:17.771 23382 TRACE neutron.
2016-04-21 16:22:17.771 23382 TRACE neutron.
2016-04-21 16:22:17.771 23382 TRACE neutron.
2016-04-21 16:22:17.771 23382 TRACE neutron.
2016-04-21 16:22:17.771 23382 TRACE neutron.
2016-04-21 16:22:17.771 23382 TRACE neutron.
2016-04-21 16:22:17.771 23382 TRACE neutron.
2016-04-21 16:22:17.771 23382 TRACE neutron.
2016-04-21 16:22:17.771 23382 TRACE neutron.
2016-04-21 16:22:17.771 23382 TRACE neutron.
2016-04-21 16:22:17.771 23382 TRACE neutron.
2016-04-21 16:22:17.771 23382 TRACE neutron.
2016-04-21 16:22:17.771 23382 TRACE neutron.
2016-04-21 16:22:17.774 23382 ERROR neutron.
2016-04-21 16:22:17.774 23382 TRACE neutron.
2016-04-21 16:22:17.774 23382 TRACE neutron.
2016-04-21 16:22:17.774 23382 TRACE neutron.
2016-04-21 16:22:17.774 23382 TRACE neutron.
2016-04-21 16:22:17.774 23382 TRACE neutron.
2016-04-21 16:22:17.774 23382 TRACE neutron.
2016-04-21 16:22:17.774 23382 TRACE neutron.
2016-04-21 16:22:17.774 23382 TRACE neutron.
2016-04-21 16:22:17.774 23382 TRACE neutron.
2016-04-21 16:22:17.774 23382 TRACE neutron.
2016-04-21 16:22:17.774 23382 TRACE neutron.
2016-04-21 16:22:17.774 23382 TRACE neutron.
2016-04-21 16:22:17.774 23382 TRACE neutron.
2016-04-21 16:22:17.774 23382 TRACE neutron.
2016-04-21 16:22:17.774 23382 TRACE neutron.
2016-04-21 16:22:17.774 23382 TRACE neutron.
2016-04-21 16:22:17.774 23382 TRACE neutron.
2016-04-21 16:22:17.774 23382 TRACE neutron.
2016-04-21 16:22:17.774 23382 TRACE neutron.
2016-04-21 16:22:17.774 23382 TRACE neutron.
2016-04-21 16:22:17.774 23382 TRACE neutron.
2016-04-21 16:22:17.774 23382 TRACE neutron.
2016-04-21 16:22:17.774 23382 TRACE neutron.
2016-04-21 16:22:17.774 23382 TRACE neutron.
2016-04-21 16:22:17.774 23382 TRACE neutron.
2016-04-21 16:22:17.774 23382 TRACE neutron.
2016-04-21 16:22:17.774 23382 TRACE neutron.
2016-04-21 16:22:17.774 23382 TRACE neutron.
2016-04-21 16:22:17.774 23382 TRACE neutron.
2016-04-21 16:22:17.774 23382 TRACE neutron.
2016-04-21 16:22:17.774 23382 TRACE neutron.