Thursday, 2017-07-06

jamielennoxyea, so locally if you do lsattr on a symlink you see the failure00:02
ianwbut why are you the first person to see this? :)00:03
jamielennoxbut i have tried again to just write 8.8.8.8 in and i'm still seeing errors00:03
jamielennoxianw: i do seem to have that knack :P00:03
jamielennoxsomeone from -infra obviously did notice this but just hacked around it00:08
ianwjamielennox: but ... we do tests without infra elements and it works00:09
*** owalsh has joined #openstack-dib00:09
jamielennoxand also it's only a thing here because i'm building images in a substantially different environment to what i want to run them in so resolv.conf is an issue00:09
jamielennoxso if that's hitting the errexit we need to make that test succeed?00:11
ianwjamielennox: can you post a log?00:13
ianwhttps://github.com/openstack/diskimage-builder/blob/master/diskimage_builder/lib/common-functions#L29900:13
ianwstep 1 ... if resolv.conf is a symlink or a file, then move it out of the way, and recreate it pointing to 8.8.8.800:13
jamielennoxi have a regular nodepool bulid log, it doesn't have DEBUG on00:13
ianwno, not quite, either cat the local resolv.conf into it, or if that doesn't exist (? how) point it to 8.8.8.800:14
ianwergo /etc/resolv.conf should be a file at this point00:14
ianwso ... either something during your build is re-writing resolv.conf00:15
ianwor, maybe the lsattr *does* have issues on aufs00:15
ianwcan we determine which of the two above it is?00:15
jamielennoxok, my setup is a bit unusual so need to hack some stuff00:17
jamielennoxi'll put in an ls -al /etc/resolv.conf00:17
ianwhmm, i'm not super good with docker.  i don't think my local instance is using aufs00:18
jamielennoxi'm not actually sure how mine is set up00:20
ianwyeah, this one i've got is debian and using devicemapper it seems00:21
jamielennoxi'll need to do like echo $(cat /etc/resolv.conf) right?00:22
jamielennoxwill cat end up in logs?00:22
ianwyeah, if you're catching stdout00:28
jamielennox2017-07-06 00:32:13,098 INFO nodepool.image.build.ubuntu-xenial: b'lrwxrwxrwx 1 root root 29 Jul  6 00:29 /tmp/dib_build.irsygmWn/mnt/etc/resolv.conf -> ../run/resolvconf/resolv.conf'00:34
jamielennox2017-07-06 00:32:13,098 INFO nodepool.image.build.ubuntu-xenial: b'nameserver 8.8.8.8'00:34
jamielennox2017-07-06 00:32:13,098 INFO nodepool.image.build.ubuntu-xenial: b'nameserver 8.8.4.4'00:34
jamielennox2017-07-06 00:32:13,102 INFO nodepool.image.build.ubuntu-xenial: b'lsattr: Operation not supported While reading flags on /tmp/dib_build.irsygmWn/mnt/etc/resolv.conf'00:34
jamielennoxah, so i think what's happening there is it's a symlink, but when i cat << EOF > /etc/resolv.conf it's writing through the symlink00:35
jamielennoxand i'm pretty sure that the resolvconf package is setting up that link00:36
ianwso that might be the key ... where's that coming from?00:37
jamielennoxthat's me00:37
jamielennoxhttps://github.com/jamielennox/nodepool-dib-elements/blob/master/bonnyci-nodepool/finalise.d/55-resolv-conf00:37
jamielennoxbut assume i put an rm /etc/resolv.conf in there first, lsattr will succeed (i think - not sure on aufs), and then it will be replaced with the original resolv.conf?00:39
ianwi mean, the resolvconf package ... i'm not seeing that on our xenial builds, is something different?00:39
jamielennoxi'm not sure if i specify that manually or it's part of base00:39
jamielennoxit doesn't look like i'm specifying that anywhere specially00:41
ianwlisted as "suggested" in http://nb04.openstack.org/dib.ubuntu-xenial.log but not installed00:43
jamielennoxso i'm actually fine with having resolvconf installed, it at least appears to be doing the right thing00:44
jamielennoxlike when the link is in place i get dns00:44
ianwi'm just spinning up an env to test00:46
jamielennoxianw: so i changed the element to delete the old resolv.conf first01:00
jamielennoxno error message any more, but my resolv.conf is definitely not what i set it too01:01
ianwlsattr: Operation not supported While reading flags on /opt/tmp/dib_build.symqgeYj/mnt/etc/resolv.conf01:04
ianwUnmount /opt/tmp/dib_build.symqgeYj/mnt/sys01:04
ianwUnmount /opt/tmp/dib_build.symqgeYj/mnt/proc01:04
ianwUnmount /opt/tmp/dib_build.symqgeYj/mnt/dev/pts01:04
ianwUnmount /opt/tmp/dib_build.symqgeYj/mnt/dev01:04
ianwthat's with resolvconf installed.  but yeah, that *doesn't* stop the build, it still produced the .qcow201:04
jamielennoxyep, the build was succeeding for me too01:07
jamielennoxthe question is what should be the right thing there?01:08
jamielennoxI'd be happy with a well known file location01:10
jamielennoxlike if [-e /etc/resolv.conf.GOOD ] move that instead of resolv.conf.ORIG01:10
jamielennoxor some test to see if the /etc/resolv.conf that is in place at that point is the same as the one we copied in originally?01:12
jamielennoxif it's a symlink i can't set it immutable (which is not a solution i like anyway)01:14
ianw/opt/tmp/dib_build.eAzLKp2u/mnt/etc/resolv.conf -> ../run/resolvconf/resolv.conf01:16
jamielennoxyep01:18
ianwjamielennox: well, i built an image with resolvconf and just putting in a "if -L resolv.conf" leave it alone01:37
ianwit boots, /etc/resolv.conf points to /var/run/resolv.conf ... but it's empty01:37
ianwoooohhhh ... minimal image.  i haven't put any sort of dhcp resolver in01:38
jamielennoxso that's still not ideal because if i write resolv.conf out as a regular file in an element it will still be replaced01:40
jamielennoxon the other hand though it's probably not good practice to mess with a resolv.conf in the middle of an element because it can screw up the elements making real network connections01:42
jamielennox(which is why it would be being handled specially originally)01:46
ianwjamielennox: if you write it out as a file, you just have to set it immutable01:46
ianwand do it right at the end ...01:46
ianwalright, i have a working xenial+resolvconf image ...01:49
jamielennoxgotta run out for an hour or so02:09
ianwnp, just putting up patch now02:09
jamielennoxthe -L test would solve my problem, but it feels like a very specific solution02:09
jamielennoxwhen i changed the symlink to rm -f /etc/resolv.conf and cat ..8.8.8.8 > it was still deleted02:10
jamielennoxbecause it never tested whether it was changed02:10
ianwjamielennox: if you set it immutable, it wouldn't have been removed though?02:14
openstackgerritIan Wienand proposed openstack/diskimage-builder master: Add symlink test for resolv.conf restore  https://review.openstack.org/48080502:18
jamielennoxianw: -103:44
ianwheh, that's what i get for manually copying03:47
openstackgerritIan Wienand proposed openstack/diskimage-builder master: Add symlink test for resolv.conf restore  https://review.openstack.org/48080503:48
jamielennoxyea, i guess setting it immutable would have worked, i'd prefer not to03:55
*** andreas-f has joined #openstack-dib04:49
*** clarkb1 has joined #openstack-dib05:20
*** clarkb has quit IRC05:22
*** andreas-f has quit IRC06:07
*** andreas-f has joined #openstack-dib06:41
*** andreas-f has quit IRC07:10
openstackgerritAndreas Florath proposed openstack/diskimage-builder master: Docker matrix build  https://review.openstack.org/41434707:21
*** isaacb has joined #openstack-dib07:24
hwoarangianw: do you have time to talk abuot https://review.openstack.org/#/c/478443/8/diskimage_builder/elements/opensuse/pre-install.d/00-opensuse-setup ?08:29
ianwhwoarang: a little ... it's probably fine as is08:48
hwoarangianw: yeah i was thinking that it's ok to leave the mirrors inside the image as is. but I can work on a separate patch to decouple that08:49
ianwhwoarang: it's up to you.  obviously not important when we just throw images away in func tests08:50
hwoarangbut this will also affect the nodepool images right? the produced images will have the openstack mirrors in them08:51
hwoarangbut i guess that's fine08:51
ianwwe're not setting any of this for nodepool builds08:51
hwoarangah ok08:51
hwoarangso the nodepool images are using the distro mirrors?08:52
hwoaranginteresting. i thought you were using the infra mirrors for all the CI jobs08:52
ianwhwoarang: it's two things ... the actual builds, that happen on nb0X and then get uploaded to the CI providers all happen from upstream mirrors08:53
ianwthen when we bring up nodes, we run project-config:nodepool/scripts/configure_mirror.sh which looks at what region it's in and rewrites things to use that regions mirror08:54
hwoarangaha08:54
hwoarangthis one seems to know what to do with opensuse08:55
hwoarangso we are good on that end08:55
hwoarangok then.i think i get it now08:55
hwoarangthank you08:55
ianwyes, so when running devstack on suse, for example, package installs happen from local mirrors08:55
ianwthe problem with centos was that running "yum" to create the chroot on ubuntu was going back to default mirrors08:55
ianwwhich made the CI jobs very unreliable ... often we'd get a bad mirror in the rotation and then that causes havoc failing randomly08:56
ianwso that's what i was referring to with the "building chroot" bit ... making sure that the zypper call running on ubuntu was pulling from the mirror08:57
hwoarangyep i get it now08:58
hwoarangthank you for the explanation08:58
ianw:)09:02
openstackgerritMarkos Chandras (hwoarang) proposed openstack/diskimage-builder master: elements: openstack-ci-mirrors: Use openSUSE mirrors for gating jobs  https://review.openstack.org/47844309:14
*** mdbooth has joined #openstack-dib11:45
mdboothCan anybody help: 'openstack overcloud image build' fails for me using CentOS/RDO master11:46
mdboothThe symptom is: + systemctl enable os-collect-config11:46
mdboothOperation failed: No such file or directory11:46
mdboothThe immediate cause is that it wasn't installed, as there are no rdo yum repos in the dib chroot while it builds11:47
mdboothSo all openstack package are actually missing11:47
mdboothI'm running this on the undercloud, so the repos are obviously present on the host11:48
mdboothI'm not familiar with dib. Can any point me to some code which constructs the chroot, and may be repsponsible for configuring yum repos?11:54
openstackgerritMarkos Chandras (hwoarang) proposed openstack/diskimage-builder master: elements: openstack-ci-mirrors: Use openSUSE mirrors for gating jobs  https://review.openstack.org/47844312:06
*** farosas_ has joined #openstack-dib12:08
openstackgerritMarkos Chandras (hwoarang) proposed openstack/diskimage-builder master: elements: openstack-ci-mirrors: Use openSUSE mirrors for gating jobs  https://review.openstack.org/47844312:30
openstackgerritMarkos Chandras (hwoarang) proposed openstack/diskimage-builder master: elements: openstack-ci-mirrors: Use openSUSE mirrors for gating jobs  https://review.openstack.org/47844314:44
*** isaacb has quit IRC14:57
clarkb1mdbooth: dib operates in stages with each stage executing scripts included by elements for that stage via run parts14:58
clarkb1mdbooth: you'll want to find out what elements your image build is using then go from there to see what is configuring yum repos. Dib itself won't do that, the elements should14:58
*** farosas_ is now known as farosas15:06
*** clarkb1 is now known as clarkb15:54
mdboothclarkb: Thanks. Got it sorted in the end. There's some special sauce to configure yum repos I wasn't aware of.15:55
*** andreas-f has joined #openstack-dib19:50
*** andreas-f has quit IRC20:49
*** farosas has quit IRC21:09
*** Sukhdev has joined #openstack-dib23:40

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