Thursday, 2024-12-05

JayFHmm. I think I've found a bug wherein svc-map's package-install.yaml, it's using dib_python_version, and the logs imply it's not functional00:03
JayFhttps://www.irccloud.com/pastebin/GoFH2XRs/00:03
JayFand then, the build later fails with pyyaml not being installed00:03
clarkbJayF: I probably need more words to understand ^15:56
clarkbI don't know what dib_python_version has to do with it in particular. The pyyaml install is a in the image using hte distro package manager15:56
JayFhttps://opendev.org/openstack/diskimage-builder/src/branch/master/diskimage_builder/elements/svc-map/package-installs.yaml#L615:56
JayFthose "dib_python_version" stanzas basically act as "if" statements15:57
clarkbdib_python_version is internal to dib to determien if it is running under python2 or python3 (somethign that can probably be removed at this point) iirc15:57
JayFand, at least in my gentoo example, are never getting installed15:57
JayFif I remove the dib_python_version (and the python 2 implementation) it works as expected15:57
clarkboh I see hte pkg listings in svc map are python2 only15:57
clarkboh no it has both?15:58
JayFYeah, and neither get installed15:58
JayFlooking at the code, I'm 90% sure there's a logic error in https://opendev.org/openstack/diskimage-builder/src/branch/master/diskimage_builder/elements/package-installs/bin/package-installs-squash#L17015:58
clarkbthe easy solution would be to flatten to python3 only since dib doesn't do python2 anymore15:58
JayFwe don't support *building images that contain* python 2 anymore?15:59
clarkbbut also you can run that code to generate the package list from the map files without running all of dib15:59
clarkbJayF: we do, but dib_python_version is the version dib is running under15:59
JayFso it's actually double-useless15:59
JayFbecause the code that uses pyyaml runs in-system15:59
JayFthat's why we have to do package-installs15:59
JayFSGTM, I'm happy to remove the py2 support, although I do think there's a general bug in there somewhere ... I have a stack of things to fix so I'm happy to punt on the more complex solution :)16:00
clarkbI don't think its double useless16:00
clarkbits just that dib is python3 capable and all of the things dib builds in haev python316:00
clarkbso we don't need to distinguish between python2 vs pytho3n anymore for dib itself16:00
JayFwell what I'm saying is, we're saying "if we're running DIB on the *buildhost* under python 2.x, clearly we are building an image that uses python2.x"16:01
JayFthat's how the logic is written right now16:01
JayFif dib_python_version is being used to decide what version of a library to install /inside the image/16:01
JayF(which is what's happening)16:01
clarkbJayF: dib_python_version determiens the python version to use within the image build for dib things alone. It gets removed in the cleanup phase16:01
JayFaha, okay16:02
JayFthat makes it more align 16:02
clarkbit still happens in the image but the python executable (a symlink really) is just for dib scripts16:02
JayFokay cool16:02
clarkbits not something that the final image care about and as long as all images support python3 we don't need python2 anymore16:02
clarkband I think centos 7 was the last holdout?16:02
clarkbthat said selecting packages based on variable definitions is a more general feature and fixing that in pkg map processing is probably still worth while16:04
clarkbis that log saying it thinks the python version is "collect-data"16:05
JayFno16:05
JayFit's saying it's happening /in the collect_data method/16:05
JayFI'm fairly sure the bad logic is here https://opendev.org/openstack/diskimage-builder/src/branch/master/diskimage_builder/elements/package-installs/bin/package-installs-squash#L17316:05
JayFI couldn't ever figure out a case where that would resolve to true16:06
JayFand in my tests, dib_py_version was 3, dib_py_version_env was ''16:06
JayFso it would [conjecturing] fit if we removed *some* of the py2 scaffolding in DIB but not all16:06
JayFleaving this broken16:06
JayFI think the "fix" is to remove this feature from package-installs and pull any similarly py2-compat code from package-installs.yaml throughout the repo16:07
JayFI can write that change right after breakfast16:07
clarkbDIB_PYTHON_VERSION is set by the dib-python element in an environment.d script16:07
clarkbJayF: I think we need to undersatnd why it fails first before we can prescribe a fix16:07
clarkbdid dib-python run?16:07
JayFI need to hit pause on this conversation for like, 15 minutes16:08
JayFI'll check the output and get back to you16:08
clarkbsvc-map doesn't seem to have any element deps16:08
JayFI suspect the answer is "no, it didn't"16:08
clarkbI suspect the fix is to add dib-python as an element dep to svc-map16:08
JayF++ I will look into that16:08
* JayF testing that fix16:24
JayFclarkb: good call, PR incoming16:31
opendevreviewJay Faulkner proposed openstack/diskimage-builder master: Fix pyyaml install for svc-map  https://review.opendev.org/c/openstack/diskimage-builder/+/93719216:33
clarkbthen separately if we want to start trimming out the use of dib-python entirely I think that is worthy of consideration too. But is a separate thing16:34
clarkbprobably the main thing to check first is if any of the supported build targets are python2 only. Off the top of my head centos 7 was the last one and we very recently removed support for it16:34
clarkb(and it is EOL upstream too)16:34
JayFI'll note Gentoo has a 2.7 slot for python available (mainly because of things with build scripts that still depend on python 2.7, like some chromium versions :X)16:35
JayFI am very +1 to just pretending that doesn't exist16:35
JayFlol16:35
JayFplus it's not supported as a PYTHON_TARGET which means while we'll install the interpreter, we will not install any package-manager packages that depend on it directly (e.g. you can't install tox into python 2.7, only supported pythons, currently 3.10-3.12)16:36
clarkbJayF: many dib targets still support python2. That isn't in qustion. The thing that matters is can dib run all of its scripts under python3 only16:56
clarkbfungi dib functests for 937192 are failing trying to build openeuler I suspect due to the mirror changes18:33
clarkbfungi: should we stop worrying about dib testing openeuler for now or maybe figure out disabling the use of our mirrors? Wonder if you have any thoughts on that18:33
clarkbbut thinking the scv map fix is probably a good thing to include in a release18:34
fungilookin' (not that i have the first clue what i'm lookin' for nor really the first thing about that distro)18:34
fungikinda amused that the job was previously passing, since the mirroring was totally broken and the volume was over quota18:34
clarkbI wonder if it used simple/basic/lowlevel enough packages to function in that capacit?18:35
clarkbhttps://zuul.opendev.org/t/openstack/build/d40f2ec691ed45ceb9db3d425b9b5076/log/logs/openeuler-minimal_22.03-LTS-build-succeeds.FAIL.log is the logfile18:35
clarkband its dfienitely getting 404s from the mirror and is sad about it18:36
clarkblet me see if Ican sort out turning off the use of the mirror18:36
clarkb(because honestly turning off the mirror entirely might be a reasonable thing to try too)18:36
fungimight just be as simple as a hard-coded version string18:36
fungii guess https://zuul.opendev.org/t/openstack/build/d40f2ec691ed45ceb9db3d425b9b5076/log/logs/openeuler-minimal_22.03-LTS-build-succeeds.FAIL.log#319 is the first error?18:37
fungiyeah, per the error it's looking for openEuler-22.03-LTS and what we've mirrored now is openEuler-24.03-LTS18:39
opendevreviewClark Boylan proposed openstack/diskimage-builder master: Disable openeuler mirror use in dib-functests  https://review.opendev.org/c/openstack/diskimage-builder/+/93720018:39
clarkbI think ^ that will drop the use of the mirror and we should find normal package repos I hope18:40
clarkbthen the next step is for people who want openeulre images to figure out dib updates (which I think there is a change for actually)18:40
clarkb"Error: No package basesystem available." IGuess we have to provide a location explicitly19:09
clarkbmaybe we should just disable the functest instead?19:09
clarkbI'm open to ideas or volunteers to fix this properly but I'm not sure I will be doing that (happy to workaround though)19:10
JayFTBH I hadn't even heard of openeuler until the noise about mirroring it :)19:51
JayFI keep getting out of disk space errors in the package install step21:24
JayFdo we, at some point, create a limited sized image or something?21:24
JayFbecause I have lots of disk space, and I realized this is after a loopback mount step, which implies we've got an image file created21:24
* JayF hrms21:24
clarkbJayF: by default dib runs in a tmpfs which yo ucan override if that isn't big enough21:32
JayFYeah, i've done that21:32
JayFhttps://www.irccloud.com/pastebin/mbyCYljc/21:32
JayFand there is no tmpfs mount during the build21:32
JayFI ensured it both via code changes locally and checking my mounts21:33
clarkbI would expect that means you're filling whatever DIB_TMP is set to21:33
JayFthat's 100% not the case, confirmed21:33
clarkbdoes portage try t obuild in some special location maybe?21:33
JayFI have 56GB free in /21:33
clarkbcould be that is filling21:33
JayFI suspect that is what's happening, perhaps21:34
JayFbut AFAICT nothing *inside the chroot* is tmpfs mounted, either21:34
JayFwhich is why I went around to "am I somehow in like, a loopback mounted qcow file that's too small"21:34
JayFI'm either missing something obvious or there's a misdirection I'm not catching21:34
JayFthis is also a ramdisk build, which might be special21:35
clarkbdib doesn't do anything with mounting the actual target image until near the very end21:35
clarkbit should build everything in a chroot on the normal filesystem then it does some math to calculate image size and create san image that it mounts and copies content into21:36
JayFthis /is/ happening in finalize.d21:36
clarkbwhy are you emerging the kenrel in finalize.d?21:36
JayFit's doing a general update and I changed the use21:36
JayFI can fix that ordering issue21:36
JayFyou might have quacked me to the answer21:36
clarkbyour package installs should generally occur in intsall.d21:36
JayFgentoo element finalize.d does an emerge update21:37
clarkbthat seems like a bug to me21:37
clarkbbut you can contorl the final disk size and make it bigger 21:38
JayFI'm going to try just moving that 99-cleanup into install.d21:38
JayFand see if it goes kaboom21:38
JayFat this point I'm still in "trying to get a thing to work" phase, not even trying to get a submittable change21:38
JayFthat worked, thank you for the pointer22:36
JayFI'll take all these fixes and split them up properly into PRs once I get to the end 22:36
* JayF down to ~300M compressed IPA image22:37

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