Comment 12 for bug 1811515

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/631275
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=284afcf24f2dfd3af20a803ada79c69205249f25
Submitter: Zuul
Branch: master

commit 284afcf24f2dfd3af20a803ada79c69205249f25
Author: Slawek Kaplonski <email address hidden>
Date: Wed Jan 16 17:13:08 2019 +0100

    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 <email address hidden>

    Change-Id: Id5e6f2f8e9c31a7138da9cd6792e9d75845b81c5
    Closes-Bug: #1811515