ianw | hrm | 00:06 |
---|---|---|
*** vabada has quit IRC | 00:10 | |
*** strigazi has quit IRC | 00:10 | |
*** vabada has joined #openstack-dib | 00:10 | |
*** strigazi has joined #openstack-dib | 00:11 | |
ianw | i think i need to see the full logs, it seems like it should work. | 00:13 |
ianw | function run_d_in_target () | 00:14 |
ianw | sudo mount --bind ${TMP_HOOKS_PATH} $TMP_MOUNT_PATH/tmp/in_target.d | 00:15 |
ianw | sudo mount -o remount,ro,bind ${TMP_HOOKS_PATH} $TMP_MOUNT_PATH/tmp/in_target.d | 00:16 |
ianw | why do we do this twice i wonder? | 00:16 |
ianw | interesting, that's the only way to get a bind mount, but new util-linux does it for you. TIL | 00:43 |
*** mjturek has joined #openstack-dib | 00:57 | |
*** mjturek has quit IRC | 00:58 | |
*** clarkb has quit IRC | 01:38 | |
*** tflink has quit IRC | 01:47 | |
*** tflink has joined #openstack-dib | 01:50 | |
*** trungnv has quit IRC | 01:50 | |
*** trungnv has joined #openstack-dib | 01:51 | |
*** trungnv has quit IRC | 04:17 | |
*** trungnv has joined #openstack-dib | 04:18 | |
*** trungnv has quit IRC | 04:23 | |
*** trungnv has joined #openstack-dib | 04:23 | |
*** olivierb has joined #openstack-dib | 05:21 | |
*** olivierb has quit IRC | 06:11 | |
*** olivierb has joined #openstack-dib | 06:12 | |
prometheanfire | ianw: do you want me to test something else? | 06:18 |
*** trungnv has quit IRC | 06:43 | |
*** trungnv has joined #openstack-dib | 06:43 | |
*** trungnv has quit IRC | 06:53 | |
*** mgoddard has joined #openstack-dib | 08:39 | |
*** mgoddard has left #openstack-dib | 08:39 | |
ianw | prometheanfire: 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 missing | 09:06 |
openstackgerrit | Ian Wienand proposed openstack/diskimage-builder master: Minor documentation updates https://review.openstack.org/609636 | 09:08 |
openstackgerrit | Merged openstack/diskimage-builder master: Fail build due to missing kauditd only when SELinux is enabled https://review.openstack.org/608187 | 09:46 |
*** mjturek has joined #openstack-dib | 13:25 | |
*** mjturek has quit IRC | 13:42 | |
*** mjturek has joined #openstack-dib | 13:45 | |
*** mjturek has quit IRC | 14:00 | |
*** mjturek has joined #openstack-dib | 14:07 | |
*** openstackgerrit has quit IRC | 14:58 | |
*** openstackgerrit has joined #openstack-dib | 15:00 | |
*** openstackgerrit has quit IRC | 15:22 | |
*** clarkb has joined #openstack-dib | 15:35 | |
*** mjturek has quit IRC | 15:51 | |
*** mjturek has joined #openstack-dib | 16:41 | |
*** mjturek has quit IRC | 17:01 | |
*** olivierb has quit IRC | 17:15 | |
*** clarkb has quit IRC | 20:18 | |
*** clarkb has joined #openstack-dib | 20:19 | |
prometheanfire | ianw: https://gist.github.com/prometheanfire/4c36b98cf54998275040db0173996476 | 22:15 |
prometheanfire | will rerun with debug | 22:16 |
ianw | i guess whatever the mount point is considered a "special device" | 22:19 |
ianw | mount: /tmp/foo: special device /not/a/dir does not exist | 22:20 |
*** openstackgerrit has joined #openstack-dib | 22:21 | |
prometheanfire | I showed you my mountpoint stuff, it's just bind mounts | 22:21 |
prometheanfire | maybe you can't bind mount a bind mount? | 22:21 |
ianw | i think my suggestion was to bind mount into the hooks directory, then symlink to that mount in the element | 22:22 |
prometheanfire | you can't symlink to an existing directory though | 22:23 |
prometheanfire | /usr/portage already exists | 22:23 |
ianw | well, mv /usr/portage /usr/portage-old; ln -s /path/to-cache /usr/portage ? | 22:23 |
prometheanfire | that'd work | 22:24 |
prometheanfire | am I allowed to trap the exit function? | 22:24 |
ianw | yes, 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 case | 22:26 |
ianw | maybe 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 that | 22:26 |
ianw | a like "add_exit_trap ..." type thing | 22:27 |
prometheanfire | ianw: 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 |
prometheanfire | but not in /tmp/dib_build.MAjETlFu/mnt/tmp/in_target.d/ | 22:39 |
prometheanfire | looks like it's recreated? | 22:39 |
prometheanfire | tmpfs on /tmp/dib_build.MAjETlFu/mnt/tmp/in_target.d type tmpfs (ro,relatime) | 22:40 |
prometheanfire | so looks like symlinks not going to work :| | 22:40 |
prometheanfire | ianw: 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 there | 22:44 |
ianw | at what point did /tmp/dib_build.MAjETlFu/mnt/tmp/in_target.d turn into a tmpfs? | 22:49 |
prometheanfire | well, let me rerun, with tee this time (rebooted to reset mounts and stuff | 22:51 |
prometheanfire | offhand though | 22:52 |
prometheanfire | diskimage_builder/lib/common-functions: sudo mount -t tmpfs tmpfs $TMP_BUILD_DIR | 22:52 |
prometheanfire | diskimage_builder/lib/common-functions: sudo mount -t tmpfs tmpfs $TMP_IMAGE_DIR | 22:52 |
prometheanfire | but I don't think those are the dirs | 22:52 |
ianw | right; TMP_HOOKS_PATH=$TMP_BUILD_DIR/hooks | 22:54 |
prometheanfire | so, modify the function? | 22:55 |
ianw | well i'm still not sure what's going on ... i don't see $TMP_HOOKS_PATH ever gets reset in any way | 22:57 |
ianw | then in run_d_in_target | 22:57 |
ianw | sudo mount --bind ${TMP_HOOKS_PATH} $TMP_MOUNT_PATH/tmp/in_target.d | 22:57 |
ianw | which looks like it mounts the same directory at /tmp/in_target.d | 22:57 |
prometheanfire | 2018-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.d | 22:59 |
prometheanfire | 2018-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.d | 22:59 |
prometheanfire | 2018-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.d | 23:00 |
prometheanfire | 2018-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.d | 23:00 |
ianw | right, 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 |
prometheanfire | it I don't see it there now | 23:02 |
prometheanfire | but it's still in install.d, not yet to finalize.d | 23:02 |
prometheanfire | the reason the cache works in the first place is because it's running from root.d | 23:03 |
prometheanfire | the trick is to pass it from the host 'namespace' to the chroot one | 23:03 |
prometheanfire | I think I need to bind mount somewhere else | 23:05 |
prometheanfire | /tmp/in_target.d (host side) is not ever passed into 'build space' | 23:09 |
prometheanfire | 2018-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.d | 23:12 |
prometheanfire | so I think I need to figure out what var provides Fj4jbyCW | 23:12 |
openstackgerrit | Ian Wienand proposed openstack/diskimage-builder master: Minor documentation updates https://review.openstack.org/609636 | 23:13 |
ianw | Fj4jbyCW will be TMP_HOOK_PATH, which is TMP_BUILD_DIR/hooks | 23:14 |
prometheanfire | currently sudo mount --bind "${GENTOO_PORTAGE_DIR}" /tmp/in_target.d/usr-portage | 23:15 |
prometheanfire | change to sudo mount --bind "${GENTOO_PORTAGE_DIR}" $TMP_BUILD_DIR/hooks/usr-portage | 23:16 |
prometheanfire | in root.d | 23:16 |
ianw | root.d runs outside chroot -- so yeah this should use $TMP_BUILD_DIR, "/tmp" is your actual system /tmp | 23:17 |
prometheanfire | yep | 23:18 |
prometheanfire | ok, testing | 23:23 |
prometheanfire | well, pre-install.d is working, now to wait | 23:28 |
prometheanfire | /tmp/dib_build.bvIJO2k1/mnt/tmp/in_target.d/usr-portage is empty | 23:40 |
prometheanfire | /tmp/dib_build.bvIJO2k1/hooks/usr-portage has files | 23:40 |
prometheanfire | ya, bind mounts masks other binds | 23:41 |
ianw | hrm, 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 locally | 23:57 |
Generated by irclog2html.py 2.15.3 by Marius Gedminas - find it at mg.pov.lt!