'NetworkNotFound' exception during listing ports
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
Medium
|
Kevin Benton | ||
Kilo |
New
|
Undecided
|
Unassigned |
Bug Description
There is a problem - when I run tests in parallel then one/two can fail.
As I see in logs one thread is deleting network while second thread is
listing all ports. And second thread get exception 'NetworkNotFound'.
Part of neutron service logs is:
2015-12-18 06:29:05.151 INFO neutron.wsgi [req-4d303e7d-
2015-12-18 06:29:05.173 ERROR neutron.policy [req-a406e696-
2015-12-18 06:29:05.173 22048 ERROR neutron.policy Traceback (most recent call last):
2015-12-18 06:29:05.173 22048 ERROR neutron.policy File "/opt/stack/
2015-12-18 06:29:05.173 22048 ERROR neutron.policy fields=
2015-12-18 06:29:05.173 22048 ERROR neutron.policy File "/opt/stack/
2015-12-18 06:29:05.173 22048 ERROR neutron.policy result = super(Ml2Plugin, self).get_
2015-12-18 06:29:05.173 22048 ERROR neutron.policy File "/opt/stack/
2015-12-18 06:29:05.173 22048 ERROR neutron.policy network = self._get_
2015-12-18 06:29:05.173 22048 ERROR neutron.policy File "/opt/stack/
2015-12-18 06:29:05.173 22048 ERROR neutron.policy raise n_exc.NetworkNo
2015-12-18 06:29:05.173 22048 ERROR neutron.policy NetworkNotFound: Network d2d2481a-
2015-12-18 06:29:05.173 22048 ERROR neutron.policy
2015-12-18 06:29:05.175 INFO neutron.
2015-12-18 06:29:05.175 INFO neutron.wsgi [req-a406e696-
Answer from Kevin Benton (in mailing list):
Ah, I believe what is happening is that the network is being deleted after the port has been retrieved from the database during the policy check. The policy check retrieves the port's network to be able to enforce the network_owner lookup: https:/
So order of events seems to be:
port list API call received
ports retrieved from db
network delete request is processed
ports processed by policy engine
policy engine triggers network lookup and hits 404
This appears to be a legitimate bug. Maybe we need to find a way to cache the network at port retrieval time for the policy engine.
Changed in neutron: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
tags: | added: api db |
Changed in neutron: | |
assignee: | nobody → Kevin Benton (kevinbenton) |
Fix proposed to branch: master /review. openstack. org/273034
Review: https:/