openstackgerrit | Ian Wienand proposed openstack/diskimage-builder master: journal-to-console: element to send systemd journal to console https://review.opendev.org/669784 | 01:25 |
---|---|---|
*** zufar has joined #openstack-dib | 04:16 | |
zufar | Hello all, I try to create image for baremetal ironic using fedora but get an error | 04:16 |
zufar | http://paste.opensuse.org/view//88594955 | 04:17 |
zufar | the error is like disk-image-create cannot find the files in fedora repository. I check the repository, there missing fedora 27. | 04:18 |
zufar | anyone know how to fix this? | 04:18 |
*** yolanda has quit IRC | 04:21 | |
*** yolanda has joined #openstack-dib | 04:22 | |
*** zufar has quit IRC | 04:37 | |
*** zufar has joined #openstack-dib | 04:50 | |
prometheanfire | ianw: if you have questions... but I do see an issue with running portageq outside of chroot | 04:58 |
ianw | promethanfire: yeah, i dunno. since the environment.d's are sourced everywhere ... that $BASH_SOURCE hack in dib-init-system seemed to come in a long time ago | 05:00 |
prometheanfire | really that environment.d needs to be set at the START of chroot | 05:01 |
ianw | zufar: fedora 27 is very old, is there a reason you're setting that? | 05:01 |
prometheanfire | that'd simplify things, so 00_00_gentoo-setvars.sh in pre-install.d | 05:02 |
prometheanfire | I think that's about as early as I can go | 05:02 |
prometheanfire | and add export there | 05:02 |
prometheanfire | and prerm,etc | 05:02 |
prometheanfire | not sure if there's a pre-chroot type function | 05:02 |
ianw | another idea might be to use the environment file, but do a "-f" check for a file in the chroot and set it when you're in chroot only | 05:03 |
prometheanfire | otherwise fall through to a default? | 05:03 |
ianw | i feel like we might have prior art for that approach, but i can't remember where | 05:03 |
ianw | or just leave it, if it has no sensible value outside the chroot | 05:04 |
prometheanfire | since gentoo is a moving target I'd like to have it 'auto' updating | 05:04 |
prometheanfire | ya, outside the chroot it kinda doesn't, kinda does | 05:04 |
prometheanfire | because it can be used for finding dirs to remove | 05:04 |
prometheanfire | cleanup | 05:04 |
ianw | you could maybe leave a stamp file or something in /tmp to know where to clean? | 05:06 |
ianw | i guess if you had some well known variable that gave the phase, you could check which phase you're in ,and know to either call the binary or inspect it in the chroot | 05:07 |
prometheanfire | ya, that's possible | 05:08 |
ianw | ... but that gets ugly, you'd end up doing manual chroot calls to run the binary so it can find it's libraries | 05:08 |
prometheanfire | env.d is souced everywhere in every phase :| | 05:08 |
prometheanfire | the dir that the chroot is extracted to should work for env.d running (run from the chroot path refrencing the chroot path stuff) | 05:09 |
ianw | or you could do the very early setvars thing inside the chroot, and save it to temp file, and then in the env file source that file, if it exists (implicitly only in the chroot) | 05:09 |
ianw | then you've also got the stamp file telling you where to cleanup | 05:10 |
prometheanfire | that could help, though root.d does env.d stuff, before I can even access the chroot | 05:10 |
prometheanfire | something closer to https://review.opendev.org/#/c/671530/6/diskimage_builder/elements/gentoo/root.d/50-gentoo-cache is what I'm thinking | 05:11 |
ianw | i think the thing there is that you're running ${TMP_MOUNT_PATH}/usr/bin/portageq on the host system ... it will likely not like the libc at least, let alone have other libraries available? | 05:12 |
prometheanfire | eh, I think we'll be fine there, as it's forgiving (mostly) | 05:14 |
prometheanfire | worked for musl builds (on glibc host) | 05:14 |
openstackgerrit | Matthew Thode proposed openstack/diskimage-builder master: support alternate portage directories https://review.opendev.org/671530 | 05:15 |
prometheanfire | let's try this ^ | 05:15 |
prometheanfire | just makes it more root.d like | 05:15 |
ianw | is portageq a binary or a script? | 05:16 |
prometheanfire | python script | 05:17 |
prometheanfire | /usr/lib/python-exec/python3.7/portageq | 05:17 |
prometheanfire | #!/usr/bin/python3.7 -b | 05:18 |
ianw | yeah so if that's called not in a complete chroot() environment, i don't see that it will work? | 05:19 |
ianw | i think the init system example might just happen to work because it's bash | 05:19 |
prometheanfire | hmm | 05:19 |
prometheanfire | I guess we'll see, the actual binary is a symlink to enter into the gentoo python install | 05:20 |
prometheanfire | guess we'll see | 05:20 |
ianw | i think making it write a file that can be ". file" sourced in the environment.d as early as possible is probably the best bet | 05:21 |
ianw | but yeah, see, maybe i'm missing something | 05:21 |
prometheanfire | what would write the file before root.d though? | 05:21 |
prometheanfire | the earliest the profile of the tarball can be determined is then | 05:21 |
prometheanfire | so maybe within root.d itself? | 05:21 |
ianw | yeah, you don't need it before then? | 05:22 |
prometheanfire | that's the earliest we can inspect the tarball | 05:22 |
prometheanfire | the goal is to inspect the fetched tarball for configuration of where dirs are | 05:23 |
prometheanfire | within the tarball (configurable) | 05:23 |
prometheanfire | that's what portageq fetches | 05:23 |
ianw | every phase after that could source the file it creates telling it where the dirs are | 05:24 |
prometheanfire | ya, env.d could optionally source it (since it's not created when root.d runs env.d | 05:25 |
prometheanfire | and cleanup.d remove the tmpfile | 05:25 |
ianw | yep, something like that | 05:29 |
prometheanfire | if this doesn't work that'll be the idea then | 05:30 |
prometheanfire | is there a var that says what stage we are in (root.d won't do the source, all others will) | 05:30 |
ianw | diskimage_builder/elements/openstack-ci-mirrors/environment.d/11-dib-distribution-mirror.bash is what i'm thinking about that has a bit of in/out chroot switching | 05:30 |
prometheanfire | something like that, but I'd rather just base it off the phase I'm in (root.d or not) | 05:32 |
prometheanfire | it's more of a 'positive' indicator than if file | 05:34 |
*** brault has quit IRC | 05:35 | |
zufar | ianw: how to change the version? I just follow the step | 05:43 |
ianw | zufar: try setting DIB_RELEASE=29 | 05:45 |
ianw | in the environment | 05:45 |
zufar | ianw: I get error Unsupported Fedora release | 05:49 |
ianw | ahh, i see you're using diskimage-builder version 2.16.0 | 05:50 |
zufar | yes | 05:51 |
ianw | we're up to like 2.24.0 now ... 2.16.0 probably doesn't have support for 29, but 27 is gone upstream ... so you're really in a situation where you have to upgrade if you want to use fedora | 05:51 |
zufar | should I increase the version, but this is the default version installed via yum in centos 7.6 | 05:51 |
ianw | i would suggest creating a virtualenv and installing dib in that, then you'll have the latest version | 05:53 |
zufar | ianw: how to install via repository? just like this via pip? `pip install git+https://github.com/openstack/diskimage-builder.git` | 05:55 |
ianw | zufar: see https://docs.openstack.org/diskimage-builder/latest/developer/invocation.html#dev-install | 05:56 |
openstackgerrit | Merged openstack/diskimage-builder master: Enable nodepool debugging for functional tests https://review.opendev.org/672608 | 06:00 |
zufar | ianw: okey I create the virtualenv, I think the script is working now. thank you | 06:01 |
openstackgerrit | Kartikeya Jain proposed openstack/diskimage-builder master: Adding new dib element https://review.opendev.org/578773 | 06:18 |
openstackgerrit | Kartikeya Jain proposed openstack/diskimage-builder master: Adding support for SLES 15 in element 'sles' https://review.opendev.org/619186 | 06:38 |
*** zufar has quit IRC | 07:35 | |
*** brault has joined #openstack-dib | 07:43 | |
*** brault has quit IRC | 07:43 | |
*** brault has joined #openstack-dib | 07:43 | |
*** priteau has joined #openstack-dib | 07:45 | |
*** brault has quit IRC | 09:00 | |
*** ivve has joined #openstack-dib | 09:08 | |
*** lennyb has joined #openstack-dib | 09:16 | |
*** brtknr has quit IRC | 10:27 | |
*** brtknr has joined #openstack-dib | 10:33 | |
*** brtknr has quit IRC | 10:56 | |
*** brtknr has joined #openstack-dib | 10:56 | |
*** Vorrtex has joined #openstack-dib | 14:19 | |
openstackgerrit | Matthew Thode proposed openstack/diskimage-builder master: support alternate portage directories https://review.opendev.org/671530 | 14:42 |
*** brault has joined #openstack-dib | 15:03 | |
*** altlogbot_0 has quit IRC | 15:48 | |
*** altlogbot_0 has joined #openstack-dib | 15:49 | |
*** brault has quit IRC | 16:04 | |
*** brault has joined #openstack-dib | 16:05 | |
*** brault has quit IRC | 16:09 | |
*** ivve has quit IRC | 17:01 | |
*** sabedevops has joined #openstack-dib | 17:25 | |
*** priteau has quit IRC | 18:13 | |
*** brault has joined #openstack-dib | 18:23 | |
*** brault has quit IRC | 18:27 | |
*** brault has joined #openstack-dib | 18:27 | |
*** ivve has joined #openstack-dib | 18:35 | |
*** dasp has quit IRC | 19:51 | |
*** dasp has joined #openstack-dib | 19:54 | |
sabedevops | Hey everyone...can someone point me in the right direction here? I have an element I'm writing, and everything seems to work except the bash script in extra-data.d. I've literally placed `exit 1` at the top of the script...but it doesn't seem to be running | 20:01 |
*** priteau has joined #openstack-dib | 20:50 | |
*** priteau has quit IRC | 20:50 | |
*** sabedevops has quit IRC | 20:55 | |
*** Vorrtex has quit IRC | 21:03 | |
*** sabedevops has joined #openstack-dib | 21:08 | |
*** ivve has quit IRC | 21:30 | |
*** sabedevops has quit IRC | 21:35 | |
*** brault has quit IRC | 21:36 | |
*** brault has joined #openstack-dib | 23:36 | |
*** brault has quit IRC | 23:40 |
Generated by irclog2html.py 2.15.3 by Marius Gedminas - find it at mg.pov.lt!