Privileged daemon should not monkey patch "os", "threading" or "socket" libraries

Bug #1887506 reported by Rodolfo Alonso
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
oslo.privsep
Fix Released
Undecided
Rodolfo Alonso

Bug Description

Daemon is an independent process that executes, in privileged mode, the methods passed. Some of those methods make use of libraries like "os" or "threading". Sometimes, those methods are not evenlet safe: the GIL is given to the next user thread and is never returned, that ends in a command timeout.

Unless there is a major reason to monkey patch those libraries, I suggest to revert the monkey patched libraries when the privileged daemon is forked. That will prevent those command timeouts so frequents in CIs like Neutron.

Example log: https://1e8559e4e36d750e9e40-0cef3de8a01f9bf4a0eb7fbe8ef64e35.ssl.cf2.rackcdn.com/740693/2/check/neutron-functional-with-uwsgi/9eefd6a/testr_results.html

Snippet: http://paste.openstack.org/show/795911/

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo.privsep (master)

Fix proposed to branch: master
Review: https://review.opendev.org/740970

Changed in oslo.privsep:
assignee: nobody → Rodolfo Alonso (rodolfo-alonso-hernandez)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo.privsep (master)

Reviewed: https://review.opendev.org/740970
Committed: https://git.openstack.org/cgit/openstack/oslo.privsep/commit/?id=1dc378c76fe14c0a8ce149088f469c0eae981194
Submitter: Zuul
Branch: master

commit 1dc378c76fe14c0a8ce149088f469c0eae981194
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Tue Jul 14 13:51:07 2020 +0000

    Undo the eventlet monkey patch for the privileged daemon

    Change-Id: I422125b137a3beadb0a79f5944a19fce62f093d6
    Closes-Bug: #1887506

Changed in oslo.privsep:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo.privsep (stable/ussuri)

Fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/747906

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo.privsep (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/747907

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo.privsep (stable/ussuri)

Reviewed: https://review.opendev.org/747906
Committed: https://git.openstack.org/cgit/openstack/oslo.privsep/commit/?id=6d41ef9f91b297091aa37721ba10456142fc5107
Submitter: Zuul
Branch: stable/ussuri

commit 6d41ef9f91b297091aa37721ba10456142fc5107
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Tue Jul 14 13:51:07 2020 +0000

    Undo the eventlet monkey patch for the privileged daemon

    Change-Id: I422125b137a3beadb0a79f5944a19fce62f093d6
    Closes-Bug: #1887506
    (cherry picked from commit 1dc378c76fe14c0a8ce149088f469c0eae981194)

tags: added: in-stable-ussuri
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo.privsep (stable/train)

Reviewed: https://review.opendev.org/747907
Committed: https://git.openstack.org/cgit/openstack/oslo.privsep/commit/?id=00e69d4f32af14a49727b0b9dcad614d8dd29edb
Submitter: Zuul
Branch: stable/train

commit 00e69d4f32af14a49727b0b9dcad614d8dd29edb
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Tue Jul 14 13:51:07 2020 +0000

    Undo the eventlet monkey patch for the privileged daemon

    Backport Notes:

    - We want to avoid requirements bump on stable branch
      so we don't backport requirements and lower-constraints changes.
    - Tests are skipped because SSL on Python2 with monkey patch
      work differently than with Python3 (tests are uncompatible).

    Change-Id: I422125b137a3beadb0a79f5944a19fce62f093d6
    Closes-Bug: #1887506
    (cherry picked from commit 1dc378c76fe14c0a8ce149088f469c0eae981194)
    (cherry picked from commit 6d41ef9f91b297091aa37721ba10456142fc5107)

tags: added: in-stable-train
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.