On Thu, 2023-11-09 at 14:05 -0800, Jay Faulkner wrote:
> Hi all,
>
> For those who aren't aware, eventlet (https://github.com/eventlet/eventlet)
> is a library that almost every OpenStack project depends on and uses
> heavily. It's the primary method in most OpenStack project for achieving
> any form of parallelism via greenthreading.
>
> A couple of weeks ago it was brought to my attention, in the #openstack-tc
> IRC channel, that the eventlet library was broken on python 3.12 due to
> changes to the SSL stdlib in python 3.12. I enlisted a G-Research Open
> Source Software (GR-OSS) developer from outside the OpenStack community,
> Itamar, to help dig into what would be required to get python 3.12 support
> for eventlet, and asked him to do an overall health check on the project.
> The results were extremely concerning, and are why I'm emailing the list
> today.
>
> First of all, the original concern -- python 3.12 support -- is being
> worked on right now; there is a PR up to migrate the SSL module here
> https://github.com/eventlet/eventlet/pull/817 and a PR up here:
> https://github.com/eventlet/eventlet/pull/820 to begin migrating from
> nose3, a deprecated testing framework used by eventlet which does not
> support python 3.12. It's worth noting that in the past (2020)
> https://github.com/eventlet/eventlet/issues/638 there was resistance to
> removing nose for testing due to at-the-time-desired python2.7 support.
> Even if they are able to be merged, these PRs only scratch the surface of
> the total effort needed to get eventlet working on python 3.12.
>
> Furthermore, activity on the eventlet project is extremely slim right now.
> There have been no commits to the primary branch in nearly eight months and
> it's been a single maintainer project for an extremely long time. There are
> also indications there may be external factors impacting the maintainers'
> availability. This lack of redundancy on a core library that we have no
> clear migration path off of is concerning as well. As a large community
> that uses eventlet; I hope we can improve it.
>
> Now we get to the cherry on top -- code quality and existing bugs. When
> Itamar began evaluating the overall state of the project, he found that
> approximately 80% of the unit tests were passing. Some of the failing unit
> tests were valid failures. In fact, one of the failure cases -- around
> locks not being properly greened on upgrade -- explains an Ironic database
> migrations unit test failure which we spent several weeks off-and-on
> debugging last cycle. Along these lines; although eventlet has CI
> configured; those tests have never passed:
> https://github.com/eventlet/eventlet/actions/workflows/test.yaml?query=is%3Asuccess
> .
>
> I don't have a specific proposal for a solution. I do know that right now,
> OpenStack services are built "all-in" on eventlet, with no obvious or easy
> migration path off. At least in the short term, keeping eventlet running
> well is critical to keeping OpenStack running well. I'm sending this email
> to raise an alarm about this situation, and to hope that community members
> can work together to solve the problem.
actully i have one proposal at lesat for the medium to short term and that is to enabel supprot for gevent
i did some expeiemtns back in september when i was on vacation with the aim of seeing what would be
required to evenutlaly replacing eventlet with genvet in nova
https://review.opendev.org/q/topic:gevnet
the idea was that we could use https://pypi.org/project/asyncio-gevent/ enable use to eventually move to asincio
via gevent as a bridge.
gevent 23.7.0 added intiall support for py3.12 which was approved impoved in 23.9.1
my understanding is gevent has less technial debth,
its build on libuv which os the same eventoloop that power node.js https://codeahoy.com/learn/libuv/ch1/
is closer to the stand lib in terems or api and i think generally less problematic to port to newer python versoions as
a result.
asyncio-gevent woudl also enabel those interested in adding nats support to oslo messaging to actully do that
as it solve the problem that we cant mix asincio and eventlet.
asyncio-gevent isnt super well mainteined unfortunetly but its also a rather small shim required to make both models
work togehter and entirly optional if we just wanted to mvoe from eventlet to gevent.
>
>
> Thanks for reading and your help,
> Jay Faulkner
> OpenStack TC Chair