Wednesday, 2018-10-10

*** mjturek has quit IRC00:06
johnsomianw Thanks for working on that mirror patch. Our centos gate has been....  rough00:07
prometheanfireianw: in order to do package actions we need to sync so we need space00:22
ianwjohnsom: i had myself convinced that we needed the final image to not refer the to mirror, but looking again i don't think that's the case ... so hopefully that makes things simpler00:41
johnsomYeah, I think we enable/disable with the ci-mirrors element and call it good00:41
ianwoh, arrgh ... didn't seem to pick it up, but tracing not enabled00:52
ianwooohhhh; except it's not going to be in the chroot.  sigh, always something00:53
ianwor i should say, the mirror config isn't in the chroot00:53
prometheanfireianw: is there a way to reactivate the cache for finalize.d?01:15
prometheanfirethat'd work too01:15
ianwnot really, i mean it's supposed to be things that happen inside the final image.  it seems like you want post-install.d more maybe01:26
*** openstackgerrit has quit IRC01:37
*** tflink has quit IRC01:37
*** odyssey4me has quit IRC01:37
*** johnsom has quit IRC01:37
*** mgagne has quit IRC01:37
*** pleia2 has quit IRC01:37
*** cloudnull has quit IRC01:37
*** hwoarang has quit IRC01:37
*** hogepodge has quit IRC01:37
*** cmurphy has quit IRC01:37
*** tonyb has quit IRC01:37
*** adam_g has quit IRC01:37
*** rm_work has quit IRC01:37
*** fungi has quit IRC01:37
*** TheJulia has quit IRC01:37
*** mordred has quit IRC01:37
*** vabada has quit IRC01:37
*** strigazi has quit IRC01:37
*** zigo has quit IRC01:37
*** prometheanfire has quit IRC01:37
*** jesusaur has quit IRC01:37
*** ianw has quit IRC01:37
*** ChanServ has quit IRC01:37
*** ianw has joined #openstack-dib01:43
*** jesusaur has joined #openstack-dib01:43
*** odyssey4me has joined #openstack-dib01:43
*** tflink has joined #openstack-dib01:43
*** prometheanfire has joined #openstack-dib01:43
*** strigazi has joined #openstack-dib01:43
*** zigo has joined #openstack-dib01:43
*** vabada has joined #openstack-dib01:43
*** rm_work has joined #openstack-dib01:44
*** fungi has joined #openstack-dib01:44
*** pleia2 has joined #openstack-dib01:44
*** cloudnull has joined #openstack-dib01:44
*** openstackgerrit has joined #openstack-dib01:44
*** hwoarang has joined #openstack-dib01:45
*** hogepodge has joined #openstack-dib01:45
*** cmurphy has joined #openstack-dib01:45
*** TheJulia has joined #openstack-dib01:46
*** mordred has joined #openstack-dib01:46
*** adam_g has joined #openstack-dib01:46
*** tonyb has joined #openstack-dib01:46
*** ChanServ has joined #openstack-dib01:47
*** card.freenode.net sets mode: +o ChanServ01:47
*** mgagne has joined #openstack-dib01:49
*** trungnv has joined #openstack-dib02:16
ianw2018-10-10 03:21:24.329147 | controller | 2018-10-10 03:21:24.328 | Loading mirror speeds from cached hostfile03:27
ianw2018-10-10 03:21:27.460514 | controller | 2018-10-10 03:21:27.460 |  * epel: mirror.bhs1.ovh.openstack.org03:27
prometheanfire?04:31
*** chhagarw has joined #openstack-dib05:01
*** olivierb has joined #openstack-dib06:42
*** odyssey4me has quit IRC07:07
*** odyssey4me has joined #openstack-dib07:08
*** mgagne has quit IRC07:09
*** tflink has quit IRC07:09
*** mgagne has joined #openstack-dib07:10
*** tflink has joined #openstack-dib07:10
*** mgagne has quit IRC07:34
*** mgagne has joined #openstack-dib07:36
*** chhagarw has quit IRC08:43
*** dhill_ has joined #openstack-dib11:38
openstackgerritAnkit Kumar proposed openstack/diskimage-builder master: Adding new dib element  https://review.openstack.org/57877312:00
*** jesusaur has quit IRC12:10
*** jesusaur has joined #openstack-dib12:16
*** mjturek has joined #openstack-dib13:50
*** johnsom has joined #openstack-dib14:30
*** clarkb has joined #openstack-dib14:43
prometheanfireianw: I'm able to build images just fine with it :|16:36
*** olivierb has quit IRC19:30
prometheanfireianw: if disk space is an issue then gentoo can't ever do package actions in finalize.d20:00
prometheanfireianw: is there a way to increase the size available in finalize.d?  Is there a way to use caching in finalize.d?20:01
prometheanfireI ask because bootloader's 50-bootloader calls install-packages20:02
prometheanfireeven when moving the package stuff to post-installs.d it runs out of space20:03
prometheanfirebecause of that installs packages20:03
prometheanfirealso20:03
prometheanfirethat finalize.d was there on purpose, because stuff like bootloader does package actions that need cleaning up20:03
prometheanfireso wtf do I do20:04
clarkbcan you install during install.d the run config in finalize?20:09
prometheanfireclarkb: the actions I take in finalize.d are to make sure everything is properly linked and stuff from a packaging perspective20:11
prometheanfire@preserved-rebuild is the big one20:12
prometheanfireclarkb: https://gist.github.com/prometheanfire/1eefd539da9b72f3ae416cab932ec53620:12
prometheanfirethat20:12
* prometheanfire doesn't know why the grub package isn't installed in the install phase20:14
clarkbprometheanfire: on debuntu it is because they configure grub iirc20:18
clarkbwhy would packages need to be rebuilt?20:18
prometheanfirethe preserved-rebuild thing?20:19
prometheanfirehttps://wiki.gentoo.org/wiki/Preserved-rebuild20:19
clarkbcan that go into a 99 step for install?20:20
clarkbbasically clean it up at the very end of package installs?20:20
prometheanfireno, because finalize.d does package actions20:20
prometheanfireand that happens after install20:20
prometheanfireit has the be the LAST package action20:21
prometheanfireincreasing the disk size seems to 'fix' it20:21
clarkbya dib assumes a disk size before finalize iirc with some small amount of padding20:24
clarkbyou can override that20:24
prometheanfireI don't see a place to do so outside of overriding it for everyone20:25
prometheanfiretests/run_functests.sh defines DIB_CMD20:25
prometheanfireand it's used twice, with the options hard coded (--image-size undefined)20:26
clarkbyou'd have to set the image size value as part of the element I think20:32
prometheanfireplaybooks/legacy/dib-dsvm-functests-python2-ubuntu-trusty-extras/run.yaml defines running the gentoo test20:33
prometheanfireno clue what gentoo/build-succeeds links to20:34
ianwi really don't think padding the size of the disk in a functional test is a good approach.  clearly there is a disconnect here between what the phase is intended to do and what is required20:34
prometheanfireianw: it's performing package actions, what phase during or after the finalize.d phase can I run my cleanup?20:35
prometheanfirecleanup.d doesn't work because it's not in a chroot20:36
prometheanfirethe problem is packages being installed during finalize.d20:36
prometheanfirenamely, grub (in bootloader)20:36
prometheanfireif packages stop getting installed there I can stop cleaning up there20:36
prometheanfirehttps://paste.pound-python.org/show/WITKeUi3m3nZGfL5oTLY/ are the places install-packages are called in finalize.d elements20:41
prometheanfirelet me put it this way20:43
prometheanfire1. install-packages will sync repos if needed20:43
prometheanfire2. if using dib caching it's always needed as cache is not available in finalize.d20:44
prometheanfire3. download + unpack is at least 2x the space of just being there to start with20:44
prometheanfire4. space runs out because download + unpack is > existing20:44
prometheanfirethat will happen with any distro, gentoo just happens to have a larger package cache so hit it first20:45
prometheanfirebtw, I did try moving it to post-installs.d but still ran out of space20:47
prometheanfire2018-10-10 19:58:26.992 | rsync: write failed on "/usr/portage/metadata/md5-cache/dev-haskell/extra-1.3.1": No space left on device (28)20:47
prometheanfirethat's with a 3G image size20:47
clarkbwith other distros you don't do any package things in finalize iirc20:48
clarkbbecause at that point the disk size is already calculated20:48
prometheanfirethey can get away with it because they don't require preserved-rebuild20:48
prometheanfireif an element changes package use flags or keywords in finalize.d that should be propigated out as needed in the final image20:49
ianwprometheanfire: in post-install.d you should not be inside the sized image, you should just be in a chroot on your disk.  possibly if that was using a tmpfs you may see something similar, i'm not sure it's related20:50
prometheanfireif an element installs a package in finalize.d without changing stuff like that it should be fine, but if it uninstalls that causes problems too20:50
prometheanfireianw: finalize.d is where the nospaceleft was found20:50
prometheanfirethe stuff I moved to post install worked fine20:50
prometheanfire2018-10-10 19:56:59.516 | dib-run-parts Running /tmp/in_target.d/finalise.d/50-bootloader20:51
prometheanfire2018-10-10 19:56:59.667 | INFO:root:Mapping for bootloader : grub-pc20:51
prometheanfire2018-10-10 19:58:26.992 | rsync: write failed on "/usr/portage/metadata/md5-cache/dev-haskell/extra-1.3.1": No space left on device (28)20:51
prometheanfire2018-10-10 19:58:26.992 | rsync error: error in file IO (code 11) at receiver.c(374) [receiver=3.1.3]20:51
ianwsorry, i must have misunderstood "btw, I did try moving it to post-installs.d but still ran out of space"20:51
prometheanfirebtw, I did try moving it to post-installs.d but still ran out of space in finalize.d20:51
prometheanfire:D20:51
prometheanfireagain, it's because package actions are taking place in finalize.d, this causes us to sync the repo, which runs us out of space20:52
ianwright, i do get the problem20:52
prometheanfirethere's not much I can do about that unless the dib cache can be accessed in finalize.d (is there a reason it's not?)20:53
ianwhowever, installing the bootloader in this phase has been there since, day 1?  essentially forever20:53
ianwwell everything is unmounted before we run the "du" to decide on the final image size20:53
prometheanfireI think it's because portage switched to using a tmp dir for syncing so that we could gpg verify it20:54
prometheanfireas far as unmounting, you could unmount, du, remount?20:54
ianwthings *could* be re-mounted into the final image, i guess20:54
* prometheanfire really does like using dib caching, it's sped up my builds quite a bit20:55
prometheanfirecut the time by more than half at least20:57
ianwi think that for nodepool we cache the inputs for the -minimal debootstrap/rpm equivalent initial builds20:58
ianwhowever, i don't think we then cache inside the chroot20:58
prometheanfireso nodepool doesn't use dib cache normally?20:59
*** mjturek has quit IRC21:00
ianwwell it uses some caching, but i don't think it is using in-chroot caching like this21:01
ianwIIRC, yum or dnf or something started doing something with it's package caching using some sort of system-specific checksum21:02
ianwit broke the idea that you could share a package cache generically21:02
prometheanfireok, well, it works here we have metadata base on build options so we can share across most profiles (maybe not musl)21:03
prometheanfireactually, since I'm doing a cache per profile that works too, nevermind21:03
prometheanfirealso, distfiles caching is there too (while it doesn't help with compile time it's nice to have stuff fetched already)21:03
prometheanfirewe actually made our own tar based format thing to record that metadata21:04
prometheanfirehttps://dev.gentoo.org/~zmedico/portage/doc/man/xpak.5.html21:04
ianwyeah DIB_APT_LOCAL_CACHE is explicitly turned off in several places21:07
prometheanfirewell, it works for gentoo at least :P21:08
prometheanfirelooks like the extra package install stuff is run in the final image too (see image-functions)21:12
*** dhill_ has quit IRC21:13
ianwit's certainly not been expressed in the documentation that you *can't* install in these phases, in fact the opposite i guess21:15
ianwhttps://docs.openstack.org/diskimage-builder/latest/developer/developing_elements.html21:15
ianwso i think we have to consider it as a limitation that we will have to have provision for installs in these phases21:16
prometheanfireyep21:17
prometheanfirewould changing the scale here work for you?21:17
prometheanfiredu_size=$(tail -n1 ${du_output} | cut -f1 | awk '{print int($1 / 0.6)}')21:17
prometheanfireline 373 of disk-image-create21:17
ianwi don't really think that's much of a solution, we make bigger images for no reason21:19
*** dhill_ has joined #openstack-dib21:19
ianwyou could re-mount the cache in 01 finalise.d and unmount it in 99 finalise.d i guess21:19
prometheanfireI can try that too, should work since if cache is not used then it's already a larger image21:21
prometheanfireactually, would the unmount stuff do that automatically?21:22
prometheanfirecan root.d run stuff from the bin dir (rather avoid duplicating code)21:22
prometheanfireianw: what's the equiv of TMP_MOUNT_PATH for finalize.d?21:28
ianwi think $TARGET_ROOT is what you want21:43
prometheanfirek21:43
prometheanfireianw: it needs to happen outside finalize.d21:47
prometheanfire2018-10-10 21:46:15.207 | /tmp/in_target.d/finalise.d/01-cache: line 9: TARGET_ROOT: unbound variable21:47
ianwhrm, yes i guess that is all done but run_d_in_target and that's not available21:50
ianwi wonder, /tmp/in_target.d should always be bind mounted in?21:52
ianwcould you possibly bind mount it in there, and just fiddle symlinks?21:52
prometheanfirebut it's all cleaned up?21:53
prometheanfirenot sure how you want me to do that21:54
prometheanfirewant me to modify 'function run_d_in_target'?21:57
ianwno i mean you can access /tmp/in_target.d in finalise.d scripts21:58
prometheanfireok, and it should have access to something?21:59
ianwif you had the cache setup and living in $TMP_HOOKS_PATH/gentoo-cache, then you should be able to symlink /tmp/in_target.d/gentoo-cache in all phases22:01
ianwi think22:01
prometheanfireah, so change the root.d/50-gentoo-cache to mount there (and bind mount from there)22:02
ianwyes, something along those lines; it is supposed to be the communication channel between outside & inside build22:04
prometheanfireya22:04
prometheanfireianw: nope :(23:09
prometheanfire2018-10-10 23:07:53.788 | mount: /tmp/dib_build.cUGXjxvs/mnt/usr/portage: special device /tmp/in_target.d/usr-portage does not exist.23:09
prometheanfireianw: cache https://paste.pound-python.org/show/bwngHHqMkgCHoCldkjHZ/23:10
prometheanfireianw: finalize https://paste.pound-python.org/show/2NsnuIydxZZERnO8jaeL/23:10
prometheanfirefailed in the finaliz.d part, caching worked til then23:11

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