Remove the usage of the Eventlet debug feature from oslo.log.
We initially started to work on this topic with the intention to solve
the problem of using the Eventlet hub_prevent_multiple_readers debug feature.
This feature is a debug convenience. This feature is not supported by the new
asyncio hub[1] of Eventlet. You can also check the documentation here[2] from eventlet. The problem with disabling this procedure is that
it exposes you to risk. Deactivation applies to the entire stack. If a project
uses oslo.log, for example nova, then it exposes all threads to concurrent access
on the process file descriptors.
As explained in the function's documentation[3], when several greenlets are reading from
the same socket, it's difficult to predict which greenlet will receive which data.
You really need to be sure of what you're doing to use this function. Also explained
in the raise condition added by this commit[4] and we have a reproducer[5] that exposes
the problem. According to our tests, removing this line does not change the fix provided.
It also seems that cinder no longer uses[6] logging native thread.
Reviewed: https:/ /review. opendev. org/c/openstack /oslo.log/ +/918426 /opendev. org/openstack/ oslo.log/ commit/ 8705f67bfbd733e df923003c0a5850 e7a4a5735b
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 8705f67bfbd733e df923003c0a5850 e7a4a5735b
Author: damani42 <email address hidden>
Date: Tue May 7 12:03:59 2024 +0200
Remove the usage of the Eventlet debug feature from oslo.log.
We initially started to work on this topic with the intention to solve multiple_ readers debug feature.
the problem of using the Eventlet hub_prevent_
This feature is a debug convenience. This feature is not supported by the new
asyncio hub[1] of Eventlet. You can also check the documentation here[2] from eventlet. The problem with disabling this procedure is that
it exposes you to risk. Deactivation applies to the entire stack. If a project
uses oslo.log, for example nova, then it exposes all threads to concurrent access
on the process file descriptors.
As explained in the function's documentation[3], when several greenlets are reading from
the same socket, it's difficult to predict which greenlet will receive which data.
You really need to be sure of what you're doing to use this function. Also explained
in the raise condition added by this commit[4] and we have a reproducer[5] that exposes
the problem. According to our tests, removing this line does not change the fix provided.
It also seems that cinder no longer uses[6] logging native thread.
Related-Bug: #1983863
[1] https:/ /review. opendev. org/c/openstack /governance/ +/902585/ 17..18 /eventlet. readthedocs. io/en/latest/ asyncio/ migration. html#known- limitations- and-work- in-progress /github. com/eventlet/ eventlet/ blob/master/ eventlet/ debug.py# L149 /github. com/eventlet/ eventlet/ commit/ cb7c8c0196ed706 65b0382909141ac 743d7633a2 /github. com/4383/ oslo.log/ blob/reproducer 2/reproducer. py /bugs.launchpad .net/oslo. log/+bug/ 1983863/ comments/ 18
[2] https:/
[3] https:/
[4] https:/
[5] https:/
[6] https:/
Co-authored-by: Hervé Beraud <email address hidden> f3c176246fea0bc 0adab4f4dc4
Change-Id: Ia4c8e82f957c4e