Wednesday, 2025-09-10

*** mhen_ is now known as mhen01:57
dansmithcroelandt: you're working on functional test de-eventletification right?13:42
croelandttkajinam: yes, I meant to do that. Fixed it :)13:56
croelandtdansmith: so I did a bunch of the inital work, abhishek took over for some more, and I'm not sure how much we have left, let me check13:56
dansmithoh okay13:57
croelandtoh we still have a dozen files that reference FunctionalTest13:58
dansmithokay13:59
dansmithmaybe we should try to get that done in G?13:59
croelandtdefinitely13:59
dansmithhas anyone done any checking on trying to remove eventlet from the venv to see if all the runtime code is really clean?13:59
dansmithI assume we still have some references to it that could be commented out (imports and things) but.. I hope we should fully run without those14:00
croelandtand running like unit tests?14:00
dansmithno, I mean running like real life.. like a devstack14:00
croelandtSo I'm pretty sure devstack runs Glance without eventlet these days14:05
croelandtstephenfin: can you confirm this?14:05
dansmithcroelandt: in config yes, I mean.. we might should make sure we can actually remove it14:05
dansmithnova-api runs without it as well, but we still use eventlet utilities incidentally (until recently)14:05
stephenfincroelandt: It can still technically deploy via it but it doesn't do in any gate job that I'm aware of. See https://review.opendev.org/c/openstack/devstack/+/93220114:07
stephenfinThough as dansmith notes, there's more to removing eventlet than simply not using eventlet server14:07
stephenfinProbably would be no harm submit a DNM (for now) patch that deletes any imports of eventlet and oslo.service and see what explodes?14:09
stephenfins/eventlet and oslo.service/eventlet/ seems there's no oslo.service in glance #TIL14:10
JayFYou'll also need to explicitly set the backend to threading in oslo_service14:10
JayFoh, neat14:10
croelandthm interesting14:10
stephenfinJayF: Maybe. Depends on what, if anything, it's using instead 14:10
croelandtI could try to build a patch that removes all eventlet references from the runtime code14:10
croelandtand see how bad things become14:10
croelandtdansmith: how does that sound?14:10
dansmithyep, only removing the eventlet import should be required for glance14:11
croelandt(this reminds me of the evenlet.posthooks weird stuff we have :p)14:11
dansmithcroelandt: sure, I wasn't saying you had to do this, I was just wondering if you had tried14:11
stephenfinIt would certainly be a fun experiment. Deleting code is one of my favourite pastimes14:11
croelandtnah but I'll see if that's doable, should be fun14:11
dansmithlike, if we kept eventlet longer just for the way our tests run, it would be nice to say that at least at _runtime_ we're clean14:11
croelandtstephenfin: so amazing when you read the stats of a patch and it's +134 - 890 :D14:11
stephenfinThe original no code movement14:12
croelandtdansmith: yeah. There are some weird cases as well. Like in the glanceclient, we check whether we are running in a patched environment, and according to hberaud I cannot just remove that, because it might cause issues if we are running in a patched environment but do not do anything specific. So that has to go last. What a freaking headache14:13
dansmithcroelandt: right that sort of thing is what I'm talking about.. there are also things we might use like eventlet.Event that still work in threading and thus we might not realize that just running in threaded mode, we're still using eventlet bits14:13
dansmithwhich is worse when you find out that their Event is a superset of threading.Event, and we might be using a thing that doesn't exist in the regular implementation14:14
croelandtand I also wanted to try 3.14rc1 soon, which I'm sure will bring other eventlet bugs14:14
croelandtF-U-N14:14
croelandtok just getting the unit tests to properly run is fun :D15:15
tkajinamIIUC as long as you don't use standalone glance-api eventlet is not used15:24
tkajinamit may be imported but no patching may be done15:24
tkajinambecause glance/cmd/api.py is the only place calling monkey_patch, but in uwsgi/mod_wsgi everything starts from different places like glance.wsgi.api or glance.common.wsgi_app15:25
tkajinam( I see you are saying the same thing. I had to scroll up the log before I dumped these :-P15:27
dansmithtkajinam: yep :)15:37
tkajinammaybe the remaining question is whether you want to keep glance-api by replacing eventlet by something else like cheroot15:38
tkajinamas was done in a few projects like ironic15:38
tkajinamor even aim to drop glance-api script suggesting users to use external mechanism such as uwsgi or gunicorn to run api15:38
dansmithpersonally, I'd rather just have one way, which is a wsgi app and  let them use gunicorn or uwsgi or whatever15:40
tkajinam(for example nova decided to drop it, because nova-api was deprecated long ago due to recommendation to use wsgi app15:40
tkajinamyeah that's aligned with my own preference15:40
dansmithcool15:41
tkajinamless code, better life :-)15:42
opendevreviewCyril Roelandt proposed openstack/glance master: DNM Eventlet removal  https://review.opendev.org/c/openstack/glance/+/96040115:52
dansmithcroelandt: there's no easy replacement for eventlet.Timeout :)15:53
dansmithbut yeah, hopefully that exercise was worthwhile to see all the places we reference it if we had to rip it out quickly15:54
croelandtyou already read it, damn15:55
croelandtthere is weird stuff here, like cmd/api.py is not really used if you run Glance as a wsgi app15:55
croelandtbut yeah it's interesting15:55
dansmithyeah15:55
croelandtIn 2 hours we'll see what actually fails :D15:55
tkajinamlooks like sqlite cache driver uses eventlet ?15:57
tkajinamI guess it has been broken in wsgi environment15:57
tkajinammaybe we can just remove it at F then everything would be sorted :-)15:57
dansmiththat's deprecated anyway AFAIK15:59
tkajinamyeah at C15:59
tkajinamso can be removed at F for sure15:59
tkajinam(I meant G = 2026.115:59
tkajinamI'm always confused by recent release names due to yyyy.n mainly used :-P16:00
dansmithbetter to use the release number, IMHO16:00
croelandthttps://review.opendev.org/c/openstack/glance/+/930027 see Abhishek's comment 16:00
dansmithonce it wrapped around to re-use letters I've lost my context16:00
dansmithcroelandt: yeah just too late for F now16:01
opendevreviewMerged openstack/glance master: Use Ubuntu Noble instead of Jammy  https://review.opendev.org/c/openstack/glance/+/95898816:02
croelandtyeah and we apparently need to not use the driver in the functional tests16:04
croelandtbut it's going away at some point 16:04
dansmithyeah16:04
croelandtnova-ceph-multistore failed16:10
croelandtdie 686 'g-api did not start'16:10
croelandthm interesting16:10
croelandtsomehow that job must not be using WSGI16:10
croelandthm, maybe I should not have remove glance-api from setup.cfg though16:14
croelandttkajinam: do you understand how we start glance with WSGI in devstack?16:14
dansmithcroelandt: we start uwsgi to load it right?16:18
croelandtI think so16:18
croelandtwe end up at https://github.com/openstack/devstack/blob/master/lib/glance#L68616:19
croelandtand the only place where glance-wsgi-api is mentioned is in cleanup_glance()16:20
croelandtso I'm a bit confused as to how this works16:20
tkajinamcroelandt, https://storage.bhs.cloud.ovh.net/v1/AUTH_dcaab5e32b234d56b626f72581e3644c/zuul_opendev_logs_dda/openstack/ddab9b6eb4b54e4b9b86e8a5629d923f/controller/logs/etc/glance/glance-uwsgi.ini16:23
tkajinammodule = glance.wsgi.api:application16:24
tkajinamthis is how uwsgi loads the wsgi app16:24
dansmithyeah,16:24
dansmithso setup.cfg changes could break the installability/loadability of the module16:24
dansmithalthough I don't see that the changes you made would be problematic16:25
dansmithmaybe more likely that we failed to import because you removed an eventlet import that we use at import time maybe?16:25
dansmithbut clearly it did start16:26
tkajinamassuming you are looking at https://zuul.opendev.org/t/openstack/build/051e7fab42664b46a962b0e6b51df37816:26
dansmither wait, maybe those are not the failed logs16:26
dansmithyeah I see, I was following your wsgi.ini link to other logs16:27
tkajinamyeah I picked it from a different devstack job16:27
tkajinamhttps://storage.bhs.cloud.ovh.net/v1/AUTH_dcaab5e32b234d56b626f72581e3644c/zuul_opendev_logs_051/openstack/051e7fab42664b46a962b0e6b51df378/controller/logs/services.txt16:27
dansmithnothing helpful in the g-api log.. maybe need to test locally16:28
tkajinam× devstack@g-api.service - Devstack devstack@g-api.service16:28
tkajinam     Loaded: loaded (/etc/systemd/system/devstack@g-api.service; enabled; preset: enabled)16:28
tkajinam     Active: failed (Result: exit-code) since Wed 2025-09-10 16:05:49 UTC; 1min 48s ago16:28
tkajinam   Duration: 1ms16:28
tkajinam    Process: 102121 ExecStart=/opt/stack/data/venv/bin/glance-api --config-dir=/etc/glance (code=exited, status=203/EXEC)16:28
tkajinam   Main PID: 102121 (code=exited, status=203/EXEC)16:28
dansmithyeah16:28
tkajinamso it seems that multi store job is using standalone g-api16:28
tkajinamwhich we should switch16:28
dansmithbut how could it be?16:28
dansmithwe removed that flag from devstack no?16:28
dansmithoh sorry that's not merged I see16:29
tkajinamhttps://opendev.org/openstack/nova/src/branch/master/.zuul.yaml#L69916:29
dansmithhttps://review.opendev.org/c/openstack/devstack/+/93220116:29
tkajinamhttps://codesearch.opendev.org/?q=GLANCE_STANDALONE%3A%20%5BtT%5Drue&i=nope&literal=nope&files=&excludeFiles=&repos=16:30
tkajinamhttps://codesearch.opendev.org/?q=WSGI_MODE%3A&i=nope&literal=nope&files=&excludeFiles=&repos=16:31
tkajinamso standalone glance-api is used only when GLANCE_STANDALONE=True or WSGI_MODE!=uwsgi16:31
tkajinamand that multistore job in nova only meets that condition (due to GLANCE_STANDALONE: True in that zuul.yaml)16:31
dansmithyeah, that may have been leftover from just wanting some of the jobs to be standalone early on, or before import worked in wsgi mode, idk16:32
tkajinamcroelandt, https://review.opendev.org/c/openstack/nova/+/960404 16:33
dansmithcroelandt: maybe just flip that flag off in a patch before your DNM, and if everything is cool, we can merge that?16:33
tkajinamadd Depend-on to that for testing16:33
dansmithyeah16:33
tkajinamDepends-on16:33
tkajinamIf that DNM patch for nova can pass then we can make it formal proposal16:33
tkajinambut for now we can probably keep it to see if the other jobs (which are supposed to use uwsgi) can pass16:34
croelandtdansmith: ok trying the Depends-On thing16:50
opendevreviewCyril Roelandt proposed openstack/glance master: DNM Eventlet removal  https://review.opendev.org/c/openstack/glance/+/96040116:51
croelandtdansmith: ok so 9 failures for the nova job, other than that s3-multistore also fails18:48
croelandtcould be worse, I think18:48
dansmithlooks like failed imports, which would be the part where we need to thread18:53
dansmithso I mean.. maybe it "could be worse" but it also might mean that we're not as clean as we think18:54
dansmithah, I bet this is missing the python interpreter config maybe18:54
dansmithhttps://zuul.opendev.org/t/openstack/build/92b1b1137ffb4b66963391d9553d0f0e/log/controller/logs/screen-g-api.txt#1777118:55
dansmiththere's a [wsgi]python_interpreter= you need to set when we're running in wsgi mode in order to be able to do things that require exec'ing sys.argv[0] like privsep18:55
dansmithsince that job was previously standalone, might just need to do that here18:56
dansmithideally that's done in the devstack de-standalone-ing patch always18:56
croelandtstephenfin: does that sound doable? ^19:21
dansmithcroelandt: um, what?19:53
dansmithcroelandt: just set this on your job: https://github.com/openstack/glance/blob/master/.zuul.yaml#L23519:54
dansmiththe patch to remove standalone mode needs to set that ^ for us always instead of us encoding it in all our jobs, which we only do for the ones that are both not standalone and have import enabled19:55
croelandtdansmith: yeah so this should be part of devstack, right20:54
dansmithtoday, devstack should probably set it "if wsgi_mode and import_enabled" yeah20:54
dansmithbut, there's no reason not to just always enable it20:54
dansmither, s/enable/set/20:55
croelandtdo real world installations haev to set up python_interpreter as well? Or can it somehow default to "which python"? 20:55
dansmith...yeah it's real :)20:55
dansmithhttps://github.com/openstack/glance/blob/master/glance/common/config.py#L65120:58
croelandtoh right21:03
croelandtGotta make sure Red Hat does that properly :)21:03
dansmithwell, again, it's only actually important for import21:04
dansmithand tbh I suspect not many people use it :D21:04
croelandtoh but I cannot set python_interpreter for nova-ceph-multistore in Glance's zuul.yaml, I'd have to redefine a job that inherits from nova-ceph-multistore, so I guess I should rather change it in Nova's zuul.yaml21:06
dansmithyou can change it in tkajinam's patch21:07
croelandtok let's do that21:08
dansmithAFAIK, the devstack patch to remove standalone mode would pass devstack's set but would have broken nova and glance's gate because of this21:17
croelandtok maybe we revisit that patch in the future21:17
croelandtdamn I probably should have edited s3-multistore config as well21:18
croelandtbut it's late, let's see if that helps with Nova and then we'll fix s321:18
dansmithack21:18

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