What I also found is that always just before such error, there is error "forced shutdown procedure, clean up netns manually" which comes from pyroute2: https://github.com/svinota/pyroute2/blob/ad992d14f47d82b39b9de3801210b51386fe42eb/pyroute2/netns/nslink.py#L199 and I suspect that maybe when one call is closing namespace and it fails, pyroute2 is doing something wrong and closes also other file descriptors which cause issue in other worker which wants to do something in namespace.
I think that issue which I mentioned is reason of failed tests when it happens during adding new interface to router, like in this example http:// logs.openstack. org/43/ 628943/ 2/check/ tempest- full/07fe3fe/ controller/ logs/screen- q-l3.txt. gz?level= ERROR#_ Jan_13_ 17_57_18_ 302877 or something similar.
If it happens during e.g. removing router or listing devices it not cause failures.
That's why IMO it not happens always.
What I also found is that always just before such error, there is error "forced shutdown procedure, clean up netns manually" which comes from pyroute2: https:/ /github. com/svinota/ pyroute2/ blob/ad992d14f4 7d82b39b9de3801 210b51386fe42eb /pyroute2/ netns/nslink. py#L199 and I suspect that maybe when one call is closing namespace and it fails, pyroute2 is doing something wrong and closes also other file descriptors which cause issue in other worker which wants to do something in namespace.