neutron/neutron/privileged
Slawek Kaplonski 284afcf24f Lock privileged.agent.linux.ip_lib functions
It is workaround of bug in pyroute2 library which, when
running in multithread environment, sometimes have issues
with NetNS class.
When NetNS.__init__() is called, it uses os.pipe() function to
create 2 file descriptors which are used to communicated between
2 processes.
In some cases when multiple threads are running it might happen
that in two instances of NetNS() class there will be same file
descriptors used and that leads to problems when one thread
closes file descriptor and second still wants to use it.

With this patch functions which uses instance of pyroute2.NetNS class
are locked thus there shouldn't be risk of using same file descriptors
in 2 separate threads.

Co-Authored-By: Rodolfo Alonso Hernandez <ralonsoh@redhat.com>

Change-Id: Id5e6f2f8e9c31a7138da9cd6792e9d75845b81c5
Closes-Bug: #1811515
2019-01-16 22:45:40 +01:00
..
agent Lock privileged.agent.linux.ip_lib functions 2019-01-16 22:45:40 +01:00
__init__.py Add capabilities for privsep 2018-10-26 18:03:52 +04:00