Thursday, 2018-10-11

ianwhrm00:06
*** vabada has quit IRC00:10
*** strigazi has quit IRC00:10
*** vabada has joined #openstack-dib00:10
*** strigazi has joined #openstack-dib00:11
ianwi think i need to see the full logs, it seems like it should work.00:13
ianwfunction run_d_in_target ()00:14
ianw      sudo mount --bind ${TMP_HOOKS_PATH} $TMP_MOUNT_PATH/tmp/in_target.d00:15
ianw      sudo mount -o remount,ro,bind ${TMP_HOOKS_PATH} $TMP_MOUNT_PATH/tmp/in_target.d00:16
ianwwhy do we do this twice i wonder?00:16
ianwinteresting, that's the only way to get a bind mount, but new util-linux does it for you.  TIL00:43
*** mjturek has joined #openstack-dib00:57
*** mjturek has quit IRC00:58
*** clarkb has quit IRC01:38
*** tflink has quit IRC01:47
*** tflink has joined #openstack-dib01:50
*** trungnv has quit IRC01:50
*** trungnv has joined #openstack-dib01:51
*** trungnv has quit IRC04:17
*** trungnv has joined #openstack-dib04:18
*** trungnv has quit IRC04:23
*** trungnv has joined #openstack-dib04:23
*** olivierb has joined #openstack-dib05:21
*** olivierb has quit IRC06:11
*** olivierb has joined #openstack-dib06:12
prometheanfireianw: do you want me to test something else?06:18
*** trungnv has quit IRC06:43
*** trungnv has joined #openstack-dib06:43
*** trungnv has quit IRC06:53
*** mgoddard has joined #openstack-dib08:39
*** mgoddard has left #openstack-dib08:39
ianwprometheanfire: i'd need to see the logs full.  we mount TMP_HOOKS_PATH in at each phase, so i don't understand why your mount seems to have gone missing09:06
openstackgerritIan Wienand proposed openstack/diskimage-builder master: Minor documentation updates  https://review.openstack.org/60963609:08
openstackgerritMerged openstack/diskimage-builder master: Fail build due to missing kauditd only when SELinux is enabled  https://review.openstack.org/60818709:46
*** mjturek has joined #openstack-dib13:25
*** mjturek has quit IRC13:42
*** mjturek has joined #openstack-dib13:45
*** mjturek has quit IRC14:00
*** mjturek has joined #openstack-dib14:07
*** openstackgerrit has quit IRC14:58
*** openstackgerrit has joined #openstack-dib15:00
*** openstackgerrit has quit IRC15:22
*** clarkb has joined #openstack-dib15:35
*** mjturek has quit IRC15:51
*** mjturek has joined #openstack-dib16:41
*** mjturek has quit IRC17:01
*** olivierb has quit IRC17:15
*** clarkb has quit IRC20:18
*** clarkb has joined #openstack-dib20:19
prometheanfireianw: https://gist.github.com/prometheanfire/4c36b98cf54998275040db017399647622:15
prometheanfirewill rerun with debug22:16
ianwi guess whatever the mount point is considered a "special device"22:19
ianwmount: /tmp/foo: special device /not/a/dir does not exist22:20
*** openstackgerrit has joined #openstack-dib22:21
prometheanfireI showed you my mountpoint stuff, it's just bind mounts22:21
prometheanfiremaybe you can't bind mount a bind mount?22:21
ianwi think my suggestion was to bind mount into the hooks directory, then symlink to that mount in the element22:22
prometheanfireyou can't symlink to an existing directory though22:23
prometheanfire/usr/portage already exists22:23
ianwwell, mv /usr/portage /usr/portage-old; ln -s /path/to-cache /usr/portage ?22:23
prometheanfirethat'd work22:24
prometheanfiream I allowed to trap the exit function?22:24
ianwyes, but you have to take efforts to prepend your trap to any other traps that would come after it.  this being quite tricky is one of the reasons we don't have a great failure case22:26
ianwmaybe i have an old change, or maybe it's just in my head, but i think we were looking at some sort of function to help with that22:26
ianwa like "add_exit_trap ..." type thing22:27
prometheanfireianw: on the physical host...22:38
prometheanfire/dev/vdc on /tmp/in_target.d/usr-portage type xfs (rw,relatime,attr2,inode64,noquota)22:38
prometheanfirebut not in /tmp/dib_build.MAjETlFu/mnt/tmp/in_target.d/22:39
prometheanfirelooks like it's recreated?22:39
prometheanfiretmpfs on /tmp/dib_build.MAjETlFu/mnt/tmp/in_target.d type tmpfs (ro,relatime)22:40
prometheanfireso looks like symlinks not going to work :|22:40
prometheanfireianw: it seems like cache dir stuff could be handled by modifying the run_d_in_target function to bindmount the cache dir, then changing the mounts to bind or symlink from there22:44
ianwat what point did /tmp/dib_build.MAjETlFu/mnt/tmp/in_target.d turn into a tmpfs?22:49
prometheanfirewell, let me rerun, with tee this time (rebooted to reset mounts and stuff22:51
prometheanfireoffhand though22:52
prometheanfirediskimage_builder/lib/common-functions:    sudo mount -t tmpfs tmpfs $TMP_BUILD_DIR22:52
prometheanfirediskimage_builder/lib/common-functions:    sudo mount -t tmpfs tmpfs $TMP_IMAGE_DIR22:52
prometheanfirebut I don't think those are the dirs22:52
ianwright; TMP_HOOKS_PATH=$TMP_BUILD_DIR/hooks22:54
prometheanfireso, modify the function?22:55
ianwwell i'm still not sure what's going on ... i don't see $TMP_HOOKS_PATH ever gets reset in any way22:57
ianwthen in run_d_in_target22:57
ianwsudo mount --bind ${TMP_HOOKS_PATH} $TMP_MOUNT_PATH/tmp/in_target.d22:57
ianwwhich looks like it mounts the same directory at /tmp/in_target.d22:57
prometheanfire2018-10-11 22:53:45.681 | + diskimage_builder/lib/img-functions:run_d_in_target:69                           :   sudo mkdir /tmp/dib_build.Fj4jbyCW/mnt/tmp/in_target.d22:59
prometheanfire2018-10-11 22:53:45.694 | + diskimage_builder/lib/img-functions:run_d_in_target:70                           :   sudo mount --bind /tmp/dib_build.Fj4jbyCW/hooks /tmp/dib_build.Fj4jbyCW/mnt/tmp/in_target.d22:59
prometheanfire2018-10-11 22:53:45.707 | + diskimage_builder/lib/img-functions:run_d_in_target:76                           :   sudo cp /root/.virtualenvs/dib/lib/python2.7/site-packages/diskimage_builder/lib/dib-run-parts /tmp/dib_build.Fj4jbyCW/mnt/tmp/in_target.d23:00
prometheanfire2018-10-11 22:53:45.721 | + diskimage_builder/lib/img-functions:run_d_in_target:77                           :   sudo mount -o remount,ro,bind /tmp/dib_build.Fj4jbyCW/hooks /tmp/dib_build.Fj4jbyCW/mnt/tmp/in_target.d23:00
ianwright, that all looks correct, where presumably your bind mount for the cache is inside "/tmp/dib_build.Fj4jbyCW/hooks" ?23:01
ianw(aka $TMP_HOOKS_PATH)23:01
prometheanfireit I don't see it there now23:02
prometheanfirebut it's still in install.d, not yet to finalize.d23:02
prometheanfirethe reason the cache works in the first place is because it's running from root.d23:03
prometheanfirethe trick is to pass it from the host 'namespace' to the chroot one23:03
prometheanfireI think I need to bind mount somewhere else23:05
prometheanfire/tmp/in_target.d (host side) is not ever passed into 'build space'23:09
prometheanfire2018-10-11 23:03:51.649 | + diskimage_builder/lib/img-functions:run_d_in_target:70                           :   sudo mount --bind /tmp/dib_build.Fj4jbyCW/hooks /tmp/dib_build.Fj4jbyCW/mnt/tmp/in_target.d23:12
prometheanfireso I think I need to figure out what var provides Fj4jbyCW23:12
openstackgerritIan Wienand proposed openstack/diskimage-builder master: Minor documentation updates  https://review.openstack.org/60963623:13
ianwFj4jbyCW will be TMP_HOOK_PATH, which is TMP_BUILD_DIR/hooks23:14
prometheanfirecurrently sudo mount --bind "${GENTOO_PORTAGE_DIR}" /tmp/in_target.d/usr-portage23:15
prometheanfirechange to sudo mount --bind "${GENTOO_PORTAGE_DIR}" $TMP_BUILD_DIR/hooks/usr-portage23:16
prometheanfirein root.d23:16
ianwroot.d runs outside chroot -- so yeah this should use $TMP_BUILD_DIR, "/tmp" is your actual system /tmp23:17
prometheanfireyep23:18
prometheanfireok, testing23:23
prometheanfirewell, pre-install.d is working, now to wait23:28
prometheanfire/tmp/dib_build.bvIJO2k1/mnt/tmp/in_target.d/usr-portage is empty23:40
prometheanfire/tmp/dib_build.bvIJO2k1/hooks/usr-portage has files23:40
prometheanfireya, bind mounts masks other binds23:41
ianwhrm, this is getting into areas i've never thought of before, but a quick test of bind mounting inside a bindmounted dir seems to do what you would expect, at least locally23:57

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