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://github.com/openstack/neutron/blob/master/etc/policy.json#L6

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. Can you file a
bug in launchpad?


Cheers,
Kevin Benton

On Fri, Dec 18, 2015 at 5:22 AM, Andrey Pavlov <[email protected]> wrote:

> Hello,
>
> I have 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 result 'NetworkNotFound'.
>
> Part of neutron service logs is here -
> http://paste.openstack.org/show/482292/
>
> What I can do to understand what happens more clearly?
>
> --
> Kind regards,
> Andrey Pavlov.
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: [email protected]?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>



-- 
Kevin Benton
__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: [email protected]?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to