Wednesday, 2022-11-09

*** slaweq_ is now known as slaweq14:09
slaweqgmann: hi, can You open LP bug for me with that?14:12
slaweqI'm in the internal meeting this week and don't have time to look at it but next week I can definitely work on that14:13
elodillesgmann kopecmartin : hi, just to inform you, most of the repositories' wallaby branches went to Extended Maintenance (hopefully the last patches will be merged in the coming days). do you plan to tag tempest and tempest plugins with wallaby-last? or do you tag *-last usually later after?14:38
gmannelodilles: sure, will do this week. thanks 15:55
dansmithfrickler: gmann: kopecmartin: I forgot the gate is broken and +Wd something.. what's the status of making the debian job nv?18:06
dansmithshould I do that real quick and use that to kick this out of the gate?18:06
opendevreviewDan Smith proposed openstack/devstack master: Make debian-bullseye job non-voting  https://review.opendev.org/c/openstack/devstack/+/86413518:13
dansmithwell, here it is if that's the decision ^18:13
gmanndansmith: ack, I have not seen its fix yet so I am fine for making n-v for now18:24
gmannkopecmartin: frickler: would you like to +W on it if around? https://review.opendev.org/c/openstack/devstack/+/86413518:25
gmannif not then i will do18:25
gmannif not around :)18:26
clarkbdansmith: gmann: the debian bullseye devstack error I'm looking at appears to be due to pyopenssl using a new argument in cryptography that I guess isn't present on the installed cryptogrpahy version: https://zuul.openstack.org/build/7fd3993f306041a198d6e01b57630a24/log/job-output.txt#12018-1206018:42
clarkbhttps://github.com/pyca/cryptography/commit/727422868510ef1d5eb554fe49669224e8dc50c0#diff-c9ed41cf466f7643671839013ae11d8315b34fcacde992483edca84d6b2dfe04R146 is the commit that added the name parameter18:42
clarkbmy first hunch was that somehow the debian package of cryptography was being used as it is much older than the 38.0.2 that we install from pypi. But ubuntu's version is also quite a bit older18:43
clarkbyou might want to hold a node and examine the python paths and similar to see why it is finding old cryptography without that name parameter.18:45
clarkb38.0.2 does include the parameter https://github.com/pyca/cryptography/blob/38.0.2/src/cryptography/utils.py#L12418:45
clarkbthis might be the pip env isolation problem I helped debug earlier this year. /me looks for logs on that18:52
clarkbhttps://meetings.opendev.org/irclogs/%23openstack-qa/%23openstack-qa.2022-05-19.log.html#t2022-05-19T23:06:27 is where I ended up with that18:56
clarkbI don't think we're tripping that specific bug anymore since it appears devtsack removed those settings. But maybe pip changes?18:57
clarkbyes, looking at that traceback more closely we are using distro installed pip which appears to use distro installed urllib3 which then imports pip installed pyopenssl which must find distro installed cryptography?19:00
clarkbfungi: do you understand how debian debundles deps for pip? I'm beginning to suspect the issue is in that system. In particular, I don't see them debundling cryptography which pyopenssl seems to depend on and I'm wondering if that is why this sometimes works and sometimes doesn't19:19
fungiclarkb: yeah, just a sec i can get you a link19:24
fungiis this debian or ubuntu?19:24
fungiubuntu i'm guessing?19:24
clarkbdebian19:25
fungiahh, okay. and venv or non-venv?19:26
clarkbnon venv19:27
clarkbfwiw I managed to reproduce the error in a docker container so nothing too special about our test images19:27
clarkbthe problem occurs after we install pyOpenSSL from pypi but not before.19:28
fungiclarkb: so this is the package in question: https://packages.debian.org/bullseye/python-pip-whl19:28
clarkbI believe that something about the debundling is broken and is allowing pyOpenSSL to escape which uses newer stuff than what is bundled (because things like cryptography are not bundled)19:28
fungiat least i expect it's that copy you're seeing19:28
clarkbyup those paths look right19:29
fungirather than fully de-vendor those libs, because pip gets weird about it, they basically build a new copy of them and re-vendor them to where pip wants19:29
clarkbfungi: https://zuul.openstack.org/build/7fd3993f306041a198d6e01b57630a24/log/job-output.txt#12018-12060 is the exception.19:29
fungiso they're technically built from the distro's source packages, but a separate copy bundled into wheel form for venv to install19:30
clarkbfungi: in a local debian bullseye container pip installing the dbcounter package in devstack works fine using python3.9 -m pip using pip from python3-pip until I install pyOpenSSL from pypi19:30
clarkbonce you install pyOpenSSL from pypi it breaks. What I'm confused about is how it works at all without pyOpenSSL in the prior state. But I suspect that it is actually using the vendored libs in urllib3.19:31
clarkbBut once you install a system level urllib3 it can jump out. Now on Ubuntu they must use a different debundling that avoids this19:31
fungii think ubuntu doesn't care as much about purity/provenance there and just distributes what python upstream embeds19:36
clarkbI'm beginning to suspect that urllib3 conditionally uses pyopenssl based on whether or not pyopenssl is installed.19:36
fungii don't see any pyopenssl in https://packages.debian.org/bullseye/all/python-pip-whl/filelist though19:37
fungiyes, that seems far more likely19:37
clarkbso this works fine until you have pyopenssl installed then it jumps out19:37
fungihttps://github.com/urllib3/urllib3/blob/main/src/urllib3/contrib/pyopenssl.py19:37
fungithe comments there are... interesting19:38
clarkbya https://github.com/urllib3/urllib3/blob/main/src/urllib3/contrib/pyopenssl.py#L41 is the line that is exploding19:38
clarkbbecause it is finding pyopenssl that is apparently too new for the cryptography that it is finding19:38
clarkbif I run from OpenSSL import SSL, crypto in an interpreter outside of the pip process it imports fine19:38
fungithough where is cryptography coming from? the python-pip-whl package doesn't seem to bring it19:39
clarkbfungi: pyopenssl has it listed as a dep. This pulls in the version of python cryptography that works (new enough with the new interface). I believe devstack is also installing the debian package and that breaks19:42
clarkbI installed both to mimic devstack. Let me edit the crptography file(s) to confirm19:42
fungiahh, okay, so there are two versions of cryptography being installed, one via devstack, another transitively from pip install pyopenssl?19:43
clarkbfungi: on my test setup yes. I think when devstack runs it directly installs both19:44
fungidevstack's is a debian python3-cryptography package i guess, which is not conflicting with the file locations for a pip install of cryptography?19:45
clarkband I've just confirmed that the pip install on bullseye is finding pip installed pyopenssl but then pyopenssl is finding distro cryptography which is not compat19:45
clarkbfungi: correct /usr/lib vs /usr/local/lib19:45
fungiyeah, so mixing distro packaged python libs and python libs from pypi. i guess we shouldn't be surprised that bursts into flames at the first opportunity19:46
clarkbI've manually installed python3-openssl and that fixes it19:46
fungimakes sense19:47
clarkbI think what is happening is that urllib3 conditionally uses pyopenssl. Since we have installed pyopenssl from pypi it tries to use it. Due to the debundling system it attempts to use debian pacakge installs for everything it can, but pyopenssl isn't there from a debian package so it jumps out to pypi19:47
clarkbcryptography is there and then we break19:47
clarkbwith this info I should be able to write a change for devstack that works19:47
clarkboh wow and to make it even more confusing novnc is what installs python3-cryptography19:49
clarkbthat means the two simple solutions are 1) don't install novnc 2) install python3-openssl19:50
funginovnc->websockify->python3-jwcrypto->python3-cryptography19:53
fungiso yes, at least indirectly it's novnc19:53
fungilooks like upstream novnc recommends installing it as a snap ;)19:55
fungii suppose we could install novnc from source and then pip install websockify19:56
fungiahh, novnc is available on npmjs.org, so we could npm install it19:57
opendevreviewClark Boylan proposed openstack/devstack master: Fix dbcounter install on Debian Bullseye  https://review.opendev.org/c/openstack/devstack/+/86414220:02
clarkbthats a "just install python3-openssl" change20:03
opendevreviewClark Boylan proposed openstack/devstack master: Fix dbcounter install on Debian Bullseye  https://review.opendev.org/c/openstack/devstack/+/86414221:54
opendevreviewMerged openstack/devstack master: Make debian-bullseye job non-voting  https://review.opendev.org/c/openstack/devstack/+/86413522:43
clarkbha so adding python3-openssl breaks the ubuntu-focal openstacksdk-functional-devstack job in a very similar way to how debian bullseye was broken before this change23:45
clarkbI'm guessing whatever ubuntu does is impacted in reverse :/23:46
clarkbI'm not sure I've got the ability to look into that today.23:46

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