neutron.tests.unit.scheduler.test_dhcp_agent_scheduler.TestNetworksFailover.test_filter_bindings test can fail depending on generated UUIDs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
Undecided
|
Bernard Cafarelli |
Bug Description
On my CentOS system, this test can locally fail 30-50% of the time - tested from queens to master:
=======
Failed 1 tests - output below:
=======
neutron.
-------
Captured traceback:
~~~~~~~~~~~~~~~~~~~
Traceback (most recent call last):
File "neutron/
return f(self, *args, **kwargs)
File "neutron/
File "/home/
File "/home/
raise mismatch_error
testtools.
The test creates 4 networks (random UUIDs), then 4 NetworkDhcpAgen
It then gets a list of these bindings with NetworkDhcpAgen
This list is then used with _filter_bindings:
with mock.patch.
res = [b for b in self._filter_
[...]
But as network_ids is not sorted, this can fail depending on the generated UUIDs. One example on my system:
network_ids:
['6f6c1774-
binding_objs:
NetworkDhcpAgen
NetworkDhcpAgen
NetworkDhcpAgen
NetworkDhcpAgen
which will give a (failing the test) res_ids: ['6f6c1774-
I am not sure why upstream gates never seem to have the problem (as far as I have checked), but sorting the network_ids makes the test passing all the time
tags: | added: neutron-proactive-backport-potential |
tags: | removed: neutron-proactive-backport-potential |
Fix proposed to branch: master /review. opendev. org/675556
Review: https:/