[eventlet-deprecation] The method ``eventlet.monkey_patch()`` is called more than once

Bug #2091538 reported by Rodolfo Alonso
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Rodolfo Alonso

Bug Description

If the method ``eventlet.monkey_patch()`` is called more than once, because of [1], present in eventlet 0.37.0, the existing RLocks are upgraded. This leads to an issue in the oslo.messaging library with using ``threading.Condition()``, based on RLock.

Error log: https://paste.opendev.org/show/bwb1L0WAhKAODIWyiep1/

[1]https://github.com/eventlet/eventlet/commit/06ec82896ebb9a26edaf6e1ad4d63393990f15b7

Changed in neutron:
assignee: nobody → Rodolfo Alonso (rodolfo-alonso-hernandez)
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/neutron/+/937527

Changed in neutron:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/neutron/+/937535

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

Reviewed: https://review.opendev.org/c/openstack/neutron/+/937527
Committed: https://opendev.org/openstack/neutron/commit/bedb19bb220664329597fc222d820df7ccbdca46
Submitter: "Zuul (22348)"
Branch: master

commit bedb19bb220664329597fc222d820df7ccbdca46
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Wed Dec 11 10:08:36 2024 +0000

    Prevent calling "monkey_patch" more than once

    This patch is adding a check to prevent calling
    ``eventlet.monkey_patch()`` more than once per execution.

    This patch is also preventing any import before this method has been
    called. Any import is moved after that.

    Closes-Bug: #2091538
    Topic: eventlet-deprecation
    Change-Id: I675aaf124d6630b6827febb1e5a5f492ed874107

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron (master)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/937535
Committed: https://opendev.org/openstack/neutron/commit/5ee7ac1261cb5cfa4b51dfd899f682d7e628ceae
Submitter: "Zuul (22348)"
Branch: master

commit 5ee7ac1261cb5cfa4b51dfd899f682d7e628ceae
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Wed Dec 11 14:08:30 2024 +0000

    Read the environment variable EVENTLET_MONKEYPATCH

    Since eventlet 0.39.0 [1] it is possible to you set an environment
    variable ``EVENTLET_MONKEYPATCH=1`` to get patching as early as
    possible in Python startup, which may avoid some problems.

    [1]https://github.com/eventlet/eventlet/commit/b754135b045306022a537b5797f2cb2cf47ba49b

    Related-Bug: #2091538
    Topic: eventlet-deprecation
    Change-Id: I928e32ea736bdb3357fdbb1de6646e69db3159d7

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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