Comment 1 for bug 2011377

Revision history for this message
Miro Tomaska (mtomaska) wrote :

Ok so it appears the agent itself is destroying the namespace when the TestMetadataAgent class tests are run concurrently. The agent start process runs sync() function which will destroy ovnmetadata namespaces not being used by datapaths on the particular chassis for the agent instance. Since each test generates its own datapath and chassis uuid, concurrent agent starts destroy each other namespaces. In another words, multiple agent test instances are operating on the same ovnmeta-* namespaces. This is the reason why running these tests with --concurrency 1 makes it always pass. This was not a problem when this test existed originally but we introduced this change[1] 4 months ago which changes the order of how namespaces are cleaned up. If this test existed when the [1] patch went it, it would have started failing the same way.
So this is really a test problem at this point, the agent code is good. I just need to figure what is the best way to deal with this. One obvious way is to just run this class with --concurrency 1 but I would prefer some better solution if possible.

[1] https://review.opendev.org/c/openstack/neutron/+/864777/2/neutron/agent/ovn/metadata/agent.py#333