Comment 6 for bug 1810504

Revision history for this message
Slawek Kaplonski (slaweq) wrote :

I was able to reproduce this issue locally by running tempest.api.network tests couple of times on vm with Devstack. It happens once for 7 up to 10 runs.

Here is what I found. Problem comes from some network used in different test. GET /ports call in failing test is done by admin user so it will return all ports from all tenants. During preparation of list of ports API worker is trying to get QoS policy for ports. Sometimes it has on list of ports port which was concurrently removed by other API worker (network was from different test). In such case net object in https://github.com/openstack/neutron/blob/master/neutron/services/qos/qos_plugin.py#L102 will be None as this network was already deleted by other thread.

So I think that this is not very common case when it may happen in real life and simple fix by checking if network is not None in https://github.com/openstack/neutron/blob/master/neutron/services/qos/qos_plugin.py#L102 should be enough to fix this issue.