Tuesday, 2024-12-10

amorinHey, I'l like some review on this: https://review.opendev.org/q/topic:%22eventlet-removal%22+project:openstack/mistral06:53
*** ralonsoh_ is now known as ralonsoh09:21
hberaud[m]ack13:14
amorinyes, this is not big changes, but still something that need double check and mistral team is kind of empty :)13:15
hberaud[m]although I'm not a mistral core.13:15
hberaud[m]in all the case thanks for your effort13:15
amorinI was wondering about the switch from eventlet to threading in oslo rpc server13:15
amorinis there any side effect of this change that you may know?13:16
hberaud[m]I guess it might have some performance impacts in some ways, as eventlet is based on cooperative coroutine, when, threading is threading,with preemptive behaviour etc...13:19
hberaud[m]but I do not expect much than that13:20
amorinok, that's something we can accept13:20
amorinanother question is about this one: https://review.opendev.org/c/openstack/mistral/+/93741813:20
amorinwe do rely on eventletutils13:20
amorinfrom oslo.utils13:21
hberaud[m]and in any case, this frees us from the eventlet so...13:21
amorinis it something we should get rid of?13:21
hberaud[m]lemme check13:21
hberaud[m]so13:22
hberaud[m]At first glance if there is no monkey patching on the mistral side, oslo.utils should not be an issue13:23
hberaud[m]if mistral is not monkey patched eventletutils.Event will just return threading.Event13:24
hberaud[m]else it will return Eventlet based Event13:24
hberaud[m]so coroutines13:24
amorinack, it will depends then on fact that we monkey_patch first13:25
hberaud[m]we can keep this usage of oslo.utils while Eventlet is not fully removed from mistral13:25
amorinwe do monkey_patch at some point, I'll have to make sure this is not the case here13:25
amorinis there any "new" way of writing this without eventletutils?13:26
hberaud[m]yes it fully depends on if the environment is patched or not13:26
amorinsomething that other project may already do?13:26
hberaud[m]writing this? What?13:26
amorinself._running = eventletutils.Event()13:27
amorinself._running = threading.Event()13:27
amorinmaybe?13:27
hberaud[m]yes13:27
hberaud[m]but you have to drop the monkey patchs first13:28
amorinyes make sense13:28
hberaud[m]Else you will fall into something like https://greenlet.readthedocs.io/en/stable/python_threads.html13:28
hberaud[m]there is plenty of eventletutils here and where in our deliverables13:29
hberaud[m]oslo.messaging own its own eventletutils13:29
hberaud[m]it seems to me that nova did the same13:29
hberaud[m]and surely lot of other deliverables13:29
hberaud[m]and each implementation of this eventletutils is slightly different13:30
hberaud[m]s/here and where/here and there/13:30
amorinanother thing, don't know if frickler is there, about this one: https://review.opendev.org/c/openstack/requirements/+/93325713:32
amorineven with last master branch of eventlet, mistral is still failing13:33
hberaud[m]yes frickler is into this channel13:33
amorinI have no idea how to achieve the monkey_patch earlier13:33
amorinunit test are executed by stestr, could it be an issue for monkey_patch?13:34
hberaud[m]maybe with something like https://github.com/openstack/oslo.messaging/blob/0deb6828683db276e7e3fadff0994b4fb04a347d/oslo_messaging/tests/__init__.py#L1713:36
hberaud[m]init files are loaded first13:36
hberaud[m]I don't know how are monkey patched the mistral tests13:37
amorinhttps://opendev.org/openstack/mistral/src/branch/master/mistral/tests/unit/__init__.py13:37
amorinI do have this13:37
amorinmaybe I should add it in the previous folder13:37
hberaud[m]yeah, I'd suggest to put it the sooner as possible during the tests loading13:38
hberaud[m]in oslo.messaging, you can observe that oslotest are even loaded after the monkey patching is applied https://github.com/openstack/oslo.messaging/blob/0deb6828683db276e7e3fadff0994b4fb04a347d/oslo_messaging/tests/__init__.py#L23C1-L23C1613:39
amorinI can see that, thanks for this tip, I will try13:41
hberaud[m]no problem :)13:42
hberaud[m]The new version is out https://pypi.org/project/eventlet/0.38.1/14:16
itamarstso I need to change oslo.log to run tests on newly released eventlet 0.38.1 (thanks hberaud[m]) but https://releases.openstack.org/constraints/upper/master is constrained to 0.36.114:59
itamarsthow does the latter get upped?15:00
hberaud[m]itamarst: https://review.opendev.org/c/openstack/requirements/+/93325715:00
itamarstcool15:00
hberaud[m]the problem is that the bump is for now not possible15:01
hberaud[m]because some cross-testing jobs are brokens15:01
hberaud[m]some deliverables needs adjustments first15:01
itamarstbroken because of new eventlet? or unrelatedly15:01
hberaud[m]because of new eventelt15:01
hberaud[m]at least since 0.37.015:02
itamarstfun15:02
itamarstare there issues filed for that?15:02
hberaud[m]but people are working on it15:02
itamarstah ok15:02
itamarstso just wait?15:02
itamarstI guess I can just submit the oslo.log patch and it will fail tests, but at least it will be in the queue?15:02
itamarstand there was a way to mark it as blocked on another, wasn't there...15:03
hberaud[m]there are links into the threads in the gerrit patch15:03
hberaud[m]if you want you can submit the oslo.log patch and put it at the top of the requirements bump15:03
hberaud[m]by using the Depends-on: https://review.opendev.org/c/openstack/requirements/+/933257 directive on the commit message15:04
itamarstthank you!15:04
hberaud[m]https://docs.openstack.org/project-team-guide/dependency-management.html#update-processes15:05
hberaud[m]you are welcome15:05
hberaud[m]itamarst: here is a living example https://review.opendev.org/c/openstack/oslo.db/+/92297615:06
hberaud[m]although the requirements addition is now merged https://review.opendev.org/c/openstack/requirements/+/93094715:07
itamarstnow I just need to figure out why the tests started failing in the past 3 weeks15:08
hberaud[m]but you can do the same with the eventlet bump and acting like if the upper-constraints were already aligned with your needs15:08
hberaud[m]ah :)15:08
hberaud[m]the joys of randomness15:09
itamarstthis is a "make pipemutex work with asyncio hub" patch15:09
hberaud[m]cool15:09
hberaud[m]that was one of our main pain point15:10
itamarststarting to get the impression the eventlet fix wasn't enough :/ this is the same error I was getting before that15:34
itamarstah15:42
itamarstit's one of those "monkey patching too late" issues15:42
frickleroh, more failures with 0.38.1, including segfaults?15:54
itamarstfrickler: are you asking me if that's what I'm seeing, or reporting something?15:54
fricklerI was referring to the results on https://review.opendev.org/c/openstack/requirements/+/933257, but I'm also curious what you are seeing with oslo.log15:55
itamarstoh, I'm just seeing issues where in order to test monkey patching you ahve to monkey patch before asyncio ever gets imported, which is difficult15:56
itamarstso you get recursive failures on _threadlocal.hub lookups and the like15:56
fricklergeneral question: is it safe to call eventlet.monkey_patch() multiple times? in neutron-server, it seems to get called again late during startup doing some module imports and it reports ungreened rlocks then, even though the initial monkey_patch call was run before any other import16:06
itamarstit _mostly_ doesn't duplicate logic16:08
itamarster16:08
itamarstit _mostly_ notices duplicate runs and doesn't run logic twice16:08
itamarstexcept a few edge cases that are probably fine16:08
itamarsthberaud[m]: I have come up with a new mechanism to trigger monkey patching :/17:45
amorinitamarst you want to propose a new wait to enable monkey patching?18:38
hberaud[m]itamarst: LGTM, I'll release tomorrow18:43
hberaud[m]it*18:43
hberaud[m]I need to dash18:43
fricklernice18:49
itamarsthberaud[m]: gonna open second PR next18:51
itamarstand it's up19:15

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!