Wednesday, 2016-12-21

openstackgerritgreghaynes proposed openstack/diskimage-builder: Move tests in to unit specific dir and fix cover  https://review.openstack.org/41327700:04
openstackgerritIan Wienand proposed openstack/diskimage-builder: Turn on debug tracing by default  https://review.openstack.org/41326500:05
openstackgerritIan Wienand proposed openstack/diskimage-builder: Turn on debug tracing by default  https://review.openstack.org/41326500:20
*** dmarlin has quit IRC00:20
openstackgerritgreghaynes proposed openstack/diskimage-builder: Move tests in to unit specific dir and fix cover  https://review.openstack.org/41327700:24
ianwpabelanger: +export LANG=en_US.utf800:52
ianwi'm prety sure dib sets LANG=C00:52
ianwi've noticed those warnings too00:53
ianwthen dib-run-parts sets it to something else again, so it gets sort ordering consistent when it's finding files00:53
ianwi.e. it's a mess00:53
ianwa problem for another day00:53
openstackgerritIan Wienand proposed openstack/diskimage-builder: Increase func testing for ubuntu-minimal element  https://review.openstack.org/41191000:53
openstackgerritIan Wienand proposed openstack/diskimage-builder: Start func testing on centos-minimal again  https://review.openstack.org/41192600:53
pabelangerianw: indeed, I want to look at that logic too. but, another day00:55
ianwpabelanger: ^ just made precise non-default, and will add to -nv job, but otherwise gtg00:56
pabelangerianw: I'd like update our chroot command to use env -i to empty our env vars by default, and explicitly pass in what we need to access00:56
pabelangerianw: ah, cool00:56
openstackgerrityunfeng zhou proposed openstack/diskimage-builder: add CONTRIBUTING.rst  https://review.openstack.org/41279501:01
openstackgerritIan Wienand proposed openstack/diskimage-builder: Turn on debug tracing by default  https://review.openstack.org/41326501:13
openstackgerrityunfeng zhou proposed openstack/diskimage-builder: add CONTRIBUTING.rst  https://review.openstack.org/41279501:27
prometheanfiredirk found a bug in building gentoo on xenial http://sprunge.us/cbhK now with comments02:03
prometheanfirethat should fix it02:03
prometheanfirepabelanger: ianw comments before I submit? http://sprunge.us/cbhK02:03
greghaynesianw: so we might have broken the world on ubuntu03:01
greghaynesIm a bit worried that infras images tomorrow are going to be broken03:01
greghaynestl;dr is for some reason pip install packages are going in to site-packages and system python is not looking anywhere but dist-packages03:01
greghaynesI have to go out and do wife birthday things tonight, but if I can ill be on later trying to debug03:03
greghaynesI think to repro you just need to make a glean image and boot it and itll fail03:03
greghaynes(or cloud-init with a similar issue)03:03
ianwgreghaynes: hmm, let me try03:17
ianwbut we make a glean image and boot in tests?03:17
greghayneswe do?03:17
greghaynesoh, the nodepool dsvm does, yes03:18
greghaynesso this may be related to pip-and-virtualenv then03:18
greghaynesif so then not as big of a worry (I think infra doesnt use it yet)03:18
ianwprometheanfire: ^^ set -x should come from the trace cmd03:19
prometheanfireianw: ya, ignore that part03:20
prometheanfiregreghaynes: gentoo looks at site-packages :D maybe infra should use gentoo03:20
greghayneshaha03:20
bkeroWasn't that being discussed for a while?03:21
prometheanfiregreghaynes: not stop being here and do wife things03:21
prometheanfirebkero: ?03:21
greghaynesyea, was about to say - I have to run and do that :)03:21
ianwgreghaynes: but simple-init brings in pip-and-virtualenv?03:21
prometheanfirebkero: it's stalled because I've been busy with politics and real life things03:21
greghaynesianw: ah if so then worth looking at if itll be broken03:21
prometheanfireif talking about gentoo images for infra03:21
* prometheanfire is now president of gentoo...03:22
ianwgreghaynes: xenial?03:22
bkeroprometheanfire: you're president now?03:22
bkeroyou mean for openstack :P03:22
prometheanfireno, of all of gentoo :P03:24
bkeroOh, so I see03:24
prometheanfirehttps://wiki.gentoo.org/wiki/Foundation:Main_Page03:24
bkeroHaha nice03:24
prometheanfire:P03:24
bkeroRight right03:25
prometheanfireit means I had to buy a scanner/printer :(03:27
bkerosuch management03:28
bkeroNext you'll be telling me that you're faxing things.03:28
prometheanfireI dealt with voip faxing a few years ago for an ITSP03:39
prometheanfirethat was fun03:39
prometheanfiremade a voip-fax to email gateway03:39
greghaynesianw: yes03:41
ianwgreghaynes: ok, building one for a bit of testing onw03:42
openstackgerritMatthew Thode proposed openstack/diskimage-builder: Fix Gentoo builds on Ubuntu 16.04 Xenial hosts  https://review.openstack.org/41339503:55
prometheanfiregreghaynes: ianw ^03:55
prometheanfirewe got the bot?03:55
bkeroyeah, irc bot got refactored03:57
bkeroeasier than running 2 of them03:57
prometheanfireya04:03
openstackgerritMerged openstack/diskimage-builder: Increase func testing for ubuntu-minimal element  https://review.openstack.org/41191004:03
ianwgreghaynes: [[0;1;31mFAILED[0m] Failed to start Glean for interface ens3.04:09
ianwthat does seem worrying04:09
greghaynesYea I bet it'll say can't import something04:09
greghaynesAnd it'll be installed in site-packages04:09
ianwsilly me forgot devuser and i can't get in, rebuilding04:09
greghaynesMy money is on the setup tools release04:10
prometheanfireianw: I've done that a few times, I ended up getting into a host and munging /etc/shadow04:11
ianwprometheanfire: unfortunately, it seems there's no boot time-out04:11
greghaynesMount; chroot;passwd04:12
greghaynesSurprising the Gentoo person doesn't do this04:12
greghaynesAre stage 1 installs no longer a thing?04:12
greghaynes:p04:12
prometheanfireianw: ?04:13
ianwyeah, the image is uploaded to a cloud, but i guess i could guestfish in.  easier to rebuild04:13
prometheanfiregreghaynes: actually, I figured out a better way04:13
prometheanfirepasswd takes a chroot option04:13
prometheanfireforgot about that for a sec04:13
openstackgerritMerged openstack/diskimage-builder: Start func testing on centos-minimal again  https://review.openstack.org/41192604:13
prometheanfiregreghaynes: get up to my (gentoo) level04:13
greghaynesOh wow, TIL04:13
ianwhmm, i wonder if we should put builds on hold04:14
prometheanfire  -R, --root CHROOT_DIR         directory to chroot into04:14
prometheanfire:D04:14
ianwwhy wouldn't CI fail on this?04:14
greghaynesianw: yep, good question04:14
ianwwe do at least ssh into it for nodepool04:14
greghaynesianw: that might be a good idea too re: builds04:15
greghaynesNot crazy about going super firefighter tomorrow04:16
greghaynesOk, really afk for a few hr04:16
ianwgreghaynes: i'll poke a bit, i have about 45 minutes before i have to disappear for a few hours too04:16
ianwok, it seems the xenial image i've just booted doesn't have python204:34
prometheanfireya, they changed the default iirc04:45
ianwgreghaynes: ok, so the problem is definitely in https://review.openstack.org/#/c/408288/05:01
ianwthat used to install "python" there05:01
ianwwhich meant that dib-python ended up being python205:01
ianwwhich had consequences making everything else work05:02
ianwclearly, things aren't ready for python3 only05:02
prometheanfirenot sure why that one non-voting test failed, would appreciate a glance https://review.openstack.org/41339505:03
prometheanfireianw: so that's the root of the problem? no py2?05:04
ianwwell, trying to use python3 to install glean i guess is the problem, something isn't ready for that05:04
ianwwhat a mess :(  how did this pass CI05:04
* prometheanfire has been out of it :(05:05
openstackgerritIan Wienand proposed openstack/diskimage-builder: Revert Xenial to Python 2  https://review.openstack.org/41341005:11
ianwgreghaynes: ok, gotta head out for a bit, but *maybe* this is enough as an emergency measure.  building images05:11
openstackgerritAndreas Florath proposed openstack/diskimage-builder: Refactor: block-device handling (partitioning)  https://review.openstack.org/37526105:43
openstackgerritIan Wienand proposed openstack/diskimage-builder: Revert Xenial to Python 2  https://review.openstack.org/41341005:45
*** pmannidi_ has quit IRC06:13
*** pmannidi has joined #openstack-dib06:14
greghaynesianw: yea, in theory that shouldnt be an issue (no installing python, python3 is py3) since xenial ships without python207:05
ianwgreghaynes: yeah, but probably not then installing pip from get-pip.py and upstream setuptools etc07:05
ianwthat is probably quite untested07:05
ianwi'm just booting now, but the build logs look good07:06
greghaynesright, so I agree - the brokennes is likely new setuptools/pip + xenial python307:06
ianwglean is put in dist-config07:06
*** adam_g has joined #openstack-dib07:07
adam_gHI!07:07
greghaynesohai07:07
greghaynesianw: btw, did you stop infra images from uploading?07:07
adam_gyeah, so hacking a bit to get a python2 installed /w that patch gets things working07:07
adam_gtrying an older ubuntu tarball now07:07
ianwgreghaynes: no, i haven't paused them yet07:07
greghaynesadam_g: current theory is new pip/setuptools + python3 + xenial is just plain broken07:08
ianwi think we probably just want an emergency release with this07:08
greghaynesyea, although id like to get a bit better idea of what is going on first07:08
adam_ggreghaynes: whats weird is, if i start a fresh xenial manually, use a symlink to the default python3 and follow the workflow everyting works07:08
greghaynessomething I hadnt looked in to - its possible we install something (pip maybe) with old setuptools then upgrade setuptools later...07:09
greghaynesadam_g: super wierd07:09
ianwok, so with that patch it boots and is on the network07:10
greghaynesthe revert to python 2?07:10
adam_gianw: what ends up installing python2 in that case?07:11
ianwadam_g: i dropped a comment, we do that in 75-debian-minimal-baseinstall07:11
greghayneswe have to do python at an odd spot because the tools to do normal package install are written in python07:12
greghaynesso, yea07:12
greghaynesinception07:12
ianwi feel like setting it to "2" is the right thing for now07:12
greghaynesif it works thats fine with me07:12
greghayneswe were effectively doing that before07:13
adam_gianw: oh, i see.. so its still broken if using ubuntu and not ubuntu-minima07:13
greghayneseek07:13
ianwhttp://people.redhat.com/~iwienand/ubuntu-minimal-python3.log07:14
ianwthat's a log, it doesn't really show anything07:14
ianwhttp://nb01.openstack.org/dib.ubuntu-xenial.log07:15
ianwyou can compare it to the latest nodepool build07:15
greghaynesbtw, the way octavia fixed this is they added a deal to symlink site-packages to dist-pacakges07:16
greghaynessuper fugly but it works07:16
ianw? surely that is wrong07:16
greghaynesindeed07:16
greghaynesalthough its in /usr/local so in theory it shouldnt break things07:17
ianwadam_g: actually, i'm not sure it's any more broken for ubuntu (!minimal).  how was it working previously?07:17
adam_gianw: xenial comes with python3.5 and thats it07:17
adam_gif you want python2x you need to install it. the ubuntu-miniaml does that via the 75-* you mentioned.07:18
greghaynesoctavia uses non-minimal and they were broken with the same issue07:18
ianwright, so before your change, then the ubuntu element would have been finding python3 & using that07:18
greghaynesit manifested differently (they used glean) but it seemed like the same root cause07:18
greghayneser they dont use gelan07:18
ianwso it must have been broken for a long time?07:18
greghaynesthey just broke today07:18
greghaynesubuntu non-minimal was super wierd, I think we were installing python2 there07:19
ianwwas something else installing python2?  it's hard to say without logs07:19
adam_gianw: yeah, it does with master. wiht the patch i commented on, it bails early because its looking for a python2 that does not exist07:19
greghaynesas a transitive dep07:19
adam_git might be installed later07:19
adam_gactually no07:20
ianwright, if it was installed at some point, the dib-python would find it, right?07:20
ianwthe python2 || python3 bit07:20
adam_gianw: well, the check for it happens pretty earlier on in the build07:20
adam_ganyway07:20
adam_glooking at an image built right now with master and 'ubuntu', python2 doesn't get installed07:21
ianwadam_g: but i mean, that check is done whenever dib-python is called07:21
adam_g(thats without the revert)07:21
ianwadam_g: so does pip work to install anything on that image?07:21
ianwpresumably, that image isn't using glean?07:21
adam_gits broken07:21
adam_git should be using glean but it cant because everything python is fubar07:21
greghaynesianw: I think when I looked in to this dib-python did python2 || python3, we installed python2 as a transitive dep and so dib-python was *always* python207:22
greghayneswhich is when I did the explicit DIB_PYTHON thing07:22
ianwright ... if something happened to install python2 *before* glean's install ran, it would seem like it would work07:23
adam_gnothing installs python2 (using 'ubuntu')07:23
greghaynesadam_g: we used to07:23
ianwBUT, it seems like ubuntu (!minimal) has been just as broken & nobody noticed?07:23
adam_g*shrug*07:23
greghaynesianw: octavia definitely noticed07:23
greghaynesand yes07:23
greghaynesit was just as broken07:23
ianwok, so I think we need to hack in a python2 install for "ubuntu"07:24
ianwunless anyone has time to dig into setuptools magic at this piont (I don't)07:24
adam_gthats basically what i did, and it ended up getting me a working python07:24
greghaynesok07:24
ianwwe can find the real bug later ... we know how to reproduce07:24
greghaynesI want to spend a few trying to root cause it a bit more but I agree that we should emergency release pretty soon07:24
ianwi feel like we commit my change07:24
greghaynesI just want a tiny bit of time :p07:24
ianwadam_g: can you submit one to install python2 for the ubuntu element?07:25
adam_gianw: also, fwiw i had to 'apt-get install python' to get a /usr/bin/python2, not 'apt-get install python2.7'07:25
adam_gianw:  yeah, okay07:25
ianwgreghaynes: i mean, even if you find the problem in setuptools, you'll still need a new release?07:25
adam_ggreghaynes: aren't you in hawaii?07:26
greghaynesadam_g: not yet07:26
greghaynesianw: yea I just want to see if I can verify were not going to make the problem worse by missing something07:26
greghaynesadam_g: on the 29th07:26
ianwok, well image builds start at like 13:00UTC.  i've got to head to dinner, if we don't have something in a bit, i'll put in the nodepool config to pause the build07:27
ianwi have built and booted the -minimal images with the force to python2, and glean works07:28
greghaynesok, my pip in chroot is definitely installing stuff in to site-packages07:28
greghaynesBUT07:28
greghaynesthings seem to work07:28
ianwwhat's the sys.path?07:28
adam_ggreghaynes: did you stop the build or are you chroot'd into the resulting image?07:28
greghaynes['', '/usr/lib/python35.zip', '/usr/lib/python3.5', '/usr/lib/python3.5/plat-x86_64-linux-gnu', '/usr/lib/python3.5/lib-dynload', '/usr/lib/python3.5/site-packages', '/usr/local/lib/python3.5/dist-packages', '/usr/lib/python3/dist-packages']07:28
greghaynesand that is my sys.;path07:28
adam_ggreghaynes: thats not what it is post-build07:28
greghaynesadam_g: dropped a bash in part of the image build07:28
greghaynesadam_g: yep07:28
adam_gim thinking thats getting polluted during build07:28
greghaynesso, now the question comes down to - wtf is changing it07:29
greghayneshttps://github.com/python/cpython/blob/master/Lib/site.py#L1 has some good info07:39
ianwhmm, pyenv creates a python3 virtualenv on debian with site-packages07:43
greghaynesI think whats supposed to happen is anything pip/python is supposed to use site-packages07:44
greghaynesand really just debian pacakges are suppsoed to use dist-packages07:44
greghaynesI suspect theres a modified ubuntu site.py07:44
ianwthat sounds right07:44
adam_ggreghaynes: thats the way i thought i remembered it, but its been a while07:45
greghaynesyep, there is07:45
adam_ggreghaynes: modified by?07:45
greghaynesadam_g: its modified to search for dist-packages07:46
* greghaynes tries to remember how to find the deb which provides this file07:46
greghaynesshould make sure its not recently changed07:46
ianwdpkg -S07:46
*** jamielennox has joined #openstack-dib07:46
greghayneslibpython3.5-minimal:amd6407:46
adam_gOH07:47
adam_gso i did a quick diff between DIB package manifests from our working images and our broken ones07:47
adam_ghttp://paste.ubuntu.com/23662868/07:47
adam_glibpython3.5-dev is new07:48
greghayneshrm07:48
adam_goh, wait. -minimal, not -dev.07:48
adam_gdont listen to me07:48
*** openstackgerrit has quit IRC07:48
greghaynesok, im finishing this build and going to try and chroot in to it after its done07:49
jamielennoxso -minimal seemed old, -dev was mid november07:49
greghaynesand see if things are broken with just a chroot07:49
greghaynesjamielennox: ok07:50
adam_ggreghaynes: also, theres the issue where things are going into /usr/lib/python3.5/ and not /usr/local/lib/python3.507:50
greghaynesadam_g: right07:50
greghaynesadam_g: no idea whats causing that07:51
jamielennoxoh, derp, makes sense minimal won't have changed it'll just have a dependency07:51
adam_gi have a hunch07:53
adam_g            if 'VIRTUAL_ENV' in os.environ or sys.base_prefix != sys.prefix:07:53
adam_g                sitepackages.append(os.path.join(prefix, "lib",07:53
adam_g                                                 "python" + sys.version[:3],07:53
adam_g                                                 "site-packages"))07:53
greghaynesyea I saw that too07:53
greghaynesoh crap07:54
greghayneswow07:54
adam_gim building in a venv07:54
adam_gand so are (our nodepoop)07:54
ianwahhhhhh07:54
adam_gbuilding right now wihtout07:54
adam_gtho i did just hack in an 'unset VIRTUAL_ENV' into the elemant and build with no luck07:54
ianwwe should really unset the environment in the chroot07:54
ianwpabelanger was just talking about that07:55
greghaynesagreed07:55
greghaynesalthough07:55
adam_gianw: yeah, i dumped an `env` output to see what might be polluting, found the VIRTUAL_ENV as well as tons of other stuff07:55
greghayneshow do we know wnat env vars we unset?07:55
greghaynessince we use env vars to pass in condfig07:55
adam_ggreghaynes: ! var.startswith('DIB_') ?07:56
greghaynesyea, that could work07:56
greghaynesI really want to know why ubuntu modifies site.py in that way07:57
greghaynesI get why dist-pacakges07:57
greghaynesbut why the venv stuff07:57
adam_ggreghaynes: is that an ubuntu delta?07:57
greghaynesyes07:57
greghayneshttps://github.com/python/cpython/blob/master/Lib/site.py#L28807:57
greghaynesok I just chrooted in and its broken as if it was booted07:59
greghaynesand setting VIRTUAL_ENV=derp fixes it07:59
greghaynesso winner07:59
adam_ggreghaynes: what do you mean?08:00
greghayneshttp://paste.ubuntu.com/23662905/08:00
adam_gwhat08:01
greghaynesyea because I think when you have a venv it adds site-packages08:01
adam_goh oh oh08:01
adam_gright08:01
greghaynesand so I think this is a two parter08:01
adam_gopposite of what im about to test08:01
adam_g(building with no V_ENV)08:01
adam_gya08:02
adam_gthings work if img built outside of venv08:03
greghaynesadam_g: can you see if stuff is installed in /usr/local/.../site-packges?08:03
greghaynesI suspect whats going on is a combination of /usr/lib + the venv08:03
adam_gyea, one sec08:03
adam_gheres the delta ubuntu/debian carries on site.py08:03
adam_gadam@amebix:~$ sudo mount /dev/nbd3p1 /mnt/qcow/08:03
adam_gadam@amebix:~$ cd /mnt/qcow/08:04
adam_ghttp://paste.ubuntu.com/23662916/08:04
adam_gadam@amebix:/mnt/qcow$ ls08:04
adam_ger08:04
adam_ggreghaynes: /usr/local/lib/python3.5/dist-packages/glean/__init__.py08:04
greghaynesso I need to pdb to confirm, but I think the sys.base_prefix != sys.prefix applies to /usr/local08:04
greghaynesin site.py08:04
adam_g/usr/local/lib/python3.5/dist-packages/ is where i'd expect it to be based on what i saw on a functioning vanilla xenial08:05
greghaynesnope, it should be site- if its installed with pip08:05
adam_gbut my IIRC things went to site-packages in older releases BIMBW08:05
greghaynesoh, yea if it changed08:05
adam_gright, i mean just by booting a vanilla (non-dib) xenial, get-pip'in and installing something, things go into /u/l/l/p/dist-packages08:06
adam_glemme check precise just to be sure08:06
greghaynesso heres what I think is going on - since we have VIRTUAL_ENV set the first path in sys.path ends up being /usr/lib/...site-packages (based on reading of site.py). This means pip installs things in to /usr/lib/...site-packages08:07
greghaynesas a result no site-packages ever gets made in /usr/local08:07
jamielennoxwhat's the diff between upstream site.py and ubuntu site.py?08:07
jamielennoxwhat is ubuntu doing?08:08
greghayneswhich means subsequent runs of site.py dont pass on that dir existing and the second part of the VIRTUAL_ENV conditional (sys.base_prefix != sys.prefix) means you will never add site-packages for /usr/lib unless you have VIRTUAL_ENV set08:08
greghaynessince sys.base_prefix =  /usr/lib08:09
adam_gjamielennox: http://paste.ubuntu.com/23662916/08:09
greghaynesand all that to say - the fix is to simply not set VIRTUAL_ENV08:09
*** pleia2_ has joined #openstack-dib08:09
greghaynesand also, why the hell does ubuntu add that conditional08:09
greghaynesjamielennox: IKR08:09
adam_g+For Debian and derivatives, this sys.path is augmented with directories08:10
adam_g+for packages distributed within the distribution. Local addons go08:10
adam_g+into /usr/local/lib/python<version>/dist-packages, Debian addons08:10
adam_g+install into /usr/lib/python3/dist-packages.08:10
adam_g+/usr/lib/python<version>/site-packages is not used.08:10
jamielennoxthat's weird08:11
greghaynesyea tahts fine, but why the VIRTUAL_ENV :/08:11
greghaynesI suspect its because they want you to install in to the venv site-pacakges08:11
jamielennoxonly appended if VIRTUAL_ENV08:11
adam_gactually this is all from debian, not ubuntu08:12
greghaynesnice08:12
adam_g  0   * d/p/distutils-install-layout.diff, d/p/site-locations.diff: Adjust the08:12
adam_g  1     "am I in a virtual environment" tests to include checking08:12
adam_g  2     sys.base_prefix != sys.prefix.  This is the definitive such test for08:12
adam_g  3     pyvenv created virtual environments (Barry Warsaw).08:12
jamielennoxI can't read debian packages08:14
jamielennoxi'm looking at http://www.ubuntuupdates.org/package/core/xenial/main/updates/libpython3.5-dev, i see the change but not the patch08:14
greghaynesjamielennox: I think there isnt a change there, what probably changed is this behavior isnt the same in python208:15
greghaynesand we started using python308:15
greghaynesalthough I *thought* we had that working08:15
greghaynesbut IMBW08:15
jamielennoxi saw lots of messing with that recently in dib history08:15
greghaynesyea, I thought we had a few days of it working with pyhon3 after that merged08:15
greghaynesbut now im not trusting my memory08:15
adam_gjamielennox: i usually pull down the package locally and look at it there08:15
adam_gjamielennox: all the web interfaces for it mostly suck unlesls the thing is hosted on launchpad08:16
jamielennoxi don't run ubuntu08:16
*** pleia2 has quit IRC08:16
adam_gjamielennox: i mean, pull down the source package not the ubuntu package08:16
jamielennoxbut i figured there would be a source package download link on that page08:16
adam_ghttps://launchpad.net/ubuntu/+source/python3.508:16
adam_gthen grab https://launchpad.net/ubuntu/+archive/primary/+files/python3.5_3.5.2-2ubuntu0~16.04.1.debian.tar.xz08:16
adam_gor if you have 'dget' installed somwhere you can you do: dget -xu https://launchpad.net/ubuntu/+archive/primary/+files/python3.5_3.5.2-2ubuntu0~16.04.1.dsc   and it'll pull down the entire source + packaging08:17
*** openstackgerrit has joined #openstack-dib08:18
openstackgerritgreghaynes proposed openstack/diskimage-builder: Dont run with VIRTUAL_ENV set  https://review.openstack.org/41348708:18
greghaynesadam_g: can you test with ^ while I write up a commit message essay08:18
adam_ggreghaynes: yeah, one sec08:18
jamielennoxso is that set there because dib itself is running in a virtualenv?08:20
greghaynesyep08:20
jamielennoxyou could always just VIRTUAL_ENV= dib-run-parts08:20
greghaynesI think if it checks for exists, not nonzerpo08:21
jamielennoxlike it may not matter but your return 1 will skip the restore08:21
greghaynesyea, if 'VIRTUAL_ENV' in os.environ08:21
greghaynesso you have to actually unset it I think08:21
jamielennoxwouldn't that work for calling a program?08:22
jamielennoxoh, dib-run-parts is a function, not a script?08:22
greghaynesits a script08:22
jamielennoxoh, lol08:23
greghaynesjamielennox: derp= python -c "import os;print('derp' in os.environ)" '08:23
jamielennoxso it doesn't  check that virtualenv is set to a string, just whether it exists in the env at all08:23
greghaynesyep08:23
jamielennoxthat's terrible08:23
greghaynesits basically a terrible lasagna08:24
greghaynesmany layers of terrible08:24
ianwone thing to consider is shipping images to infra with a /usr/bin/python may be an issue.  but also, infra-package-needs probably brings in python208:24
greghayneswith lots of cheese inbetween08:24
ianw^^ withOUT a /usr/bin/python08:24
greghaynesianw: yea, im pretty sure infra installs python2 as a dep08:24
greghaynesalthough if its an issue itd be a good one to fix IMO08:24
adam_ggreghaynes: hrm that doeset seem to work08:25
greghaynesadam_g: w00t08:25
adam_gdoes dib stuff a build log somewhere by default?08:25
greghaynesnope08:25
greghaynesI mean, it stuffs it in stdout08:25
*** pmannidi has quit IRC08:27
jamielennoxwhat file is the dib-run-parts script?08:28
greghaynesjamielennox: its in dib-utils (the package)08:28
greghaynesin our v2 branch its in tree08:28
jamielennoxwhich is not openstack/diskimage-builder ?08:28
greghayneshttp://git.openstack.org/cgit/openstack/dib-utils/tree/bin/dib-run-parts08:29
greghaynescorrect08:29
jamielennoxmore repos!08:29
greghaynesyea08:29
greghaynesits going to die soon (TM)08:29
jamielennoxok, i was going to ask why that's in a seperate repo - but probably not the time08:30
adam_gim going to die soon if i dont get off this ting08:30
adam_gtty tomorrow. it was a great night of bang-head-on-keyboard with you all.08:31
jamielennoxREADME explainsit08:31
greghaynesadam_g: yaya gn08:32
greghaynesjamielennox: its super old, I dont really remember all the history08:32
greghaynesbut yea, its turned out to be a pain08:33
greghaynesso, out with it08:33
openstackgerritgreghaynes proposed openstack/diskimage-builder: Dont run with VIRTUAL_ENV set  https://review.openstack.org/41348708:35
jamielennoxgreghaynes: and so dib-run-parts isn't going to try to run python fragments that need the virtualenv set?08:35
greghaynesjamielennox: they definitely dont, dib-run-parts just runs executables which cant reference code living outside of the chroot08:37
greghaynes(thats not 100% true, sometimes they run outside of the chroot, but even then they cant refer to modules as part of the dib package)08:37
jamielennoxah, ok, you're inside the chroot by that point08:37
greghaynestheres I think 2 phases that are outside, but otherwise its all inside08:38
jamielennoxit's not necessarily part of the dib package, requests or other stuff in python08:38
ianwgreghaynes: want me to try with 412487?08:38
greghaynesianw: yesplz08:39
jamielennoxbut yea, they're scripts so they shouldn't rely on that08:39
greghaynesjamielennox: oh I see what youre getting at - so yea in theory someone could have a script in extra-data.d which depends on some dib dep08:39
jamielennoxwell yea, i'm just wondering if anything could be relying on VIRTUAL_ENV being set within their elemetn08:40
greghaynesjamielennox: although I dont think this will break taht now that I think of it, I think VIRTUAL_ENV is purely used to tell venv about deactivate/activate and give a prompt08:40
greghaynesnot actually for anything search path related08:40
jamielennoxoh? didn't know that, i just assumed it had an actual purpose08:41
greghaynesyea I think virtualenv actually modifies sys.path and base_path08:41
greghaynesI really need to stop working though :p08:42
greghaynesgn all08:43
* greghaynes out08:43
ianwok, well this leaves us with a bit of a timebomb on master08:49
greghaynesFeel free to merge either fix and release btw08:52
adam_g413487 didnt work for me FWIW08:53
greghaynesCompelling argument08:53
greghaynesAlso there's a bug jamielennox pointed out08:54
adam_gokay cool, just making sure theres a handoff08:54
adam_galso updating the other chan08:54
* adam_g is gone for real08:55
greghaynesYa me too08:55
ianwi think we might need to do the python2 thing, for now08:55
greghaynesWfm08:55
openstackgerritIan Wienand proposed openstack/diskimage-builder: Revert Xenial to Python 2  https://review.openstack.org/41341009:06
openstackgerritSaverio Proto proposed openstack/diskimage-builder: debootstrap: avoid duplicate network configuration  https://review.openstack.org/40755109:23
openstackgerritIan Wienand proposed openstack/diskimage-builder: Revert Xenial to Python 2  https://review.openstack.org/41341009:32
openstackgerritIan Wienand proposed openstack/diskimage-builder: Revert Xenial to Python 2  https://review.openstack.org/41341009:44
openstackgerritIan Wienand proposed openstack/diskimage-builder: Revert Xenial to Python 2  https://review.openstack.org/41341009:46
openstackgerritPierre Riteau proposed openstack/diskimage-builder: Update documented default Ubuntu version  https://review.openstack.org/41358311:52
openstackgerritPierre Riteau proposed openstack/diskimage-builder: Add Xenial to the list of supported targets  https://review.openstack.org/41358411:52
*** hashar has joined #openstack-dib12:06
openstackgerritMerged openstack/diskimage-builder: Revert Xenial to Python 2  https://review.openstack.org/41341013:11
ianw^ ok 1.26.0 out, http://lists.openstack.org/pipermail/openstack-infra/2016-December/004991.html note sent to infra13:21
*** pleia2_ is now known as pleia213:54
prometheanfireianw: what's with all the releases?15:18
prometheanfireianw: constant repackaging isn't the most fun15:18
*** jamielennox is now known as jamielennox|away15:46
*** openstackgerrit_ has joined #openstack-dib15:48
*** openstackgerrit_ has quit IRC15:49
*** jamielennox|away is now known as jamielennox15:54
*** frontrunner has joined #openstack-dib16:39
greghaynesianw: it may have made it past CI because dsvm doesn't use a venv16:42
*** openstack has quit IRC17:02
*** openstack has joined #openstack-dib17:03
openstackgerritgreghaynes proposed openstack/diskimage-builder: Dont run with VIRTUAL_ENV set  https://review.openstack.org/41348717:20
greghaynesianw: adam_g jamielennox https://review.openstack.org/#/c/413487/3 seems to work now17:30
greghaynescinerama: if youre around to review as well ^17:37
openstackgerritgreghaynes proposed openstack/diskimage-builder: Dont run with VIRTUAL_ENV set  https://review.openstack.org/41348717:40
openstackgerritgreghaynes proposed openstack/diskimage-builder: Revert "Revert Xenial to Python 2"  https://review.openstack.org/41373317:40
cineramaheyyy17:41
*** jesusaur has joined #openstack-dib17:41
greghaynesohai17:44
*** brault is now known as brault|away17:58
greghaynessw818:04
greghaynesnow to wait for the ianw18:04
openstackgerritgreghaynes proposed openstack/diskimage-builder: Allow disabling of apt gpg checking  https://review.openstack.org/40938318:15
openstackgerritgreghaynes proposed openstack/diskimage-builder: Allow disabling of apt gpg checking  https://review.openstack.org/40938318:26
openstackgerritgreghaynes proposed openstack/diskimage-builder: Add support for using infra's mirrors in tests  https://review.openstack.org/40885118:28
*** hogepodge has quit IRC18:46
*** hogepodge has joined #openstack-dib19:12
adam_ggreghaynes: testing now.19:45
adam_gi had a post-DIB puke-y baby all night last night so im just getting out of bed19:46
greghayneseek20:16
greghaynessounds like fun20:16
openstackgerritAndreas Florath proposed openstack/diskimage-builder: dib-lint: python3 compatibility fixes  https://review.openstack.org/41377220:30
*** frontrunner has quit IRC20:34
*** frontrunner has joined #openstack-dib20:45
*** frontrunner has quit IRC20:50
adam_ggreghaynes: works21:01
ianwgreghaynes: hmm, that's a good point on ci not using the env21:07
ianwi guess nb.o.o don't eitehr21:08
greghaynesianw: yea21:08
greghaynesadam_g: woot21:08
ianwgreghaynes: but why only python3?21:09
greghaynesianw: I think Python2 site.py is different21:09
greghaynesNot sure why21:09
greghaynesianw: you up for merging the other fix and revert revert?21:10
ianwgreghaynes: yeah, i'll do a little investigation in a bit to convince myself :)21:11
greghaynesAwesome thanks21:11
ianwi'd like to just double check that the infra builds still get a /usr/bin/python21:16
ianwthey *shouldn't* need that, but i would not like to test that premise a day out from xmas21:17
greghaynesah ok21:41
jamielennoxgreghaynes: commented, didn't -121:41
greghaynesjamielennox: ah, will fix21:42
greghaynesboth are valid21:42
greghaynesthe check-break isnt an issue in theory but it should be consistent21:42
jamielennoxyea, i have no idea if it's a problem or not, i just see it as different to what you did elsewere21:43
openstackgerritgreghaynes proposed openstack/diskimage-builder: Dont run with VIRTUAL_ENV set  https://review.openstack.org/41348721:44
openstackgerritgreghaynes proposed openstack/diskimage-builder: Revert "Revert Xenial to Python 2"  https://review.openstack.org/41373321:44
jamielennoxthe wrap it in a function seems easiest21:44
greghaynesoh? not sure how you do that easily21:45
greghaynesthe easy way I can think of youd use a subshell, but that easy to foot gun21:46
jamielennoxnah,21:46
jamielennoxfunction run_dib_parts() {21:46
jamielennox     unset21:46
jamielennox    dib-parts21:46
jamielennox    reset21:46
jamielennox}21:46
greghaynesah21:47
greghaynesWFM21:47
greghaynesafter I finish RMAing this nuc21:47
jamielennoxno big deal21:47
*** pmannidi has joined #openstack-dib21:59
ianwcan we not env -u ?22:06
ianwalso i'm being paranoid about the /usr/bin/python stuff i guess ... since infra builds will already be doing that22:06
ianwso the infra job does run in a virtualenv22:11
ianwdevstack job22:12
jamielennoxianw: for infra to work here do you need to propose a requirements bump or something?22:15
ianwjamielennox: sorry, not sure what you mean?22:15
jamielennoxwe aren't using openstack-infra puppet scripts to deploy and it looks like we won't update disk-image-builder unless nodepool requirements forces it to bump22:16
jamielennoxi'm wondering for the nodepool builders and such does infra use constraints?22:16
jamielennoxor will it just automatically update all nodepool deps22:17
greghaynesianw: huh22:18
greghaynesianw: and the builder is installed in a venv? I thought thats generally not how devstack does things22:18
greghaynesianw: looks like youre right22:19
greghaynesso, back to having 0 idea why this passed CI22:19
ianwi don't think we a) boot xenial and b) connect ?22:20
greghaynesthat would explain it22:21
ianwjamielennox: nodepool builders just use latest release, no constraints etc22:21
jamielennoxspecifically the latest dib, or just pip install -U nodepool each time?22:22
greghaynesjamielennox: infra doesnt use g-r22:22
greghaynesso, no constraints either22:22
ianwgreghaynes: put some comments on using env?  seems simpler?22:25
greghaynesianw: I dont understand what youre saying22:26
ianwjust do the calls with "env -u VIRTUAL_ENV  ... " to clear it out22:27
ianwwe could even put "-u VIRTUAL_ENV" into something like a _DIB_CLEAR_VARS variable, incase we need to add more22:28
ianw(although, we should invert the logic to clear *everything* and just add what we want ... but not today)22:28
greghaynesah22:28
ianwthe chroot already clears tmpdir, which is probably another good one to think about22:30
ianwtrying a build with that approach...22:34
openstackgerritgreghaynes proposed openstack/diskimage-builder: Dont run with VIRTUAL_ENV set  https://review.openstack.org/41348722:40
jamielennoxcool, i didn't know you could env -u for just a single command22:40
greghaynesturns out that patch is actually a lot more simple than I was making it22:41
jamielennoxgreghaynes: you skipped a file?22:42
greghaynesso it actually only matters for in-chroot22:43
greghaynessince youre not going to be pip installing anything out of chroot22:43
greghaynesand also your out of chroot python shouldnt be borked22:43
ianwyeah, agree on that22:44
*** frontrunner has joined #openstack-dib22:57
ianwarrggghh, seems my test cloud is broken somehow!  does anything ever just work!!23:17
jamielennoxnot in my experience23:19
ianwit's ok, i just keep trying and eventually the error went away23:20
ianwbut then realised i built the test image with the python2 change still in, so it wasn't testing anything anyway :)23:21
adam_gtesting the image without a cloud is pretty EZ23:22
ianwyeah, the reliability of our internal cloud is sometimes worrying23:28
pabelangerI have some time tonight to finish off the nodepool dsvm job for diskimage-builder23:41
*** hashar has quit IRC23:50

Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!