/srv/irclogs.ubuntu.com/2019/08/28/#cloud-init.txt

blackboxswright I guess if all interfaces dhcp, we would drop the dns on the floor in those cases00:01
rharperyes00:02
rharperexpecting dhcp to provide the dns00:02
blackboxswright, ok that seems reasonable00:04
blackboxswso rharper sound reasonable to emit a warning then during network_data.json -> v2 conversion if we have global dns and no applicable interfaces?00:06
blackboxswat least it points to an impossible config presented to the instance00:07
rharperblackboxsw: yeah, I think if we din we have dns in services, but no interface to attach it to, then a warning makes sense00:09
blackboxswok will do00:19
blackboxswthx00:19
smoserbug 1841697 probably needs attention01:10
ubot5bug 1841697 in cloud-init (Ubuntu) "Upgrade corrupts 90_dpkg.cfg" [Undecided,New] https://launchpad.net/bugs/184169701:10
rharperdb_get cloud-init/datasources01:15
rharper sed -n -e /^datasource_list:/!d -e s/datasource_list:[ \[]*// -e s, \]$,, -e p /etc/cloud/cloud.cfg.d/90_dpkg.cfg01:34
rharpersmoser: that doesn't like no spaces between the leading [ and trailing ]01:34
rharperso: [ NoCloud, None ]  is OK, but [NoCloud, None] is not01:34
ivvehas anyone encountered a bug where write_files creates a dir instead of a file, regardless if there is a content?08:26
smoserrharper: My only reason for raising it here is that it happend as a result of an SRU.  I don't know if anything changed in that area (I thought a new datasource or two was added), so I thought it might be a regression as a result.12:51
smoserif it is just a matter of a person edited that file and wrote stuff that the crappy sed parser didn't like, then its nothing new while it shoudl be fixed isn't terribly important.12:52
rharpersmoser: its not an sru issue14:05
rharperit was local config14:05
rharperivve: no, if you have user-data that you can share to demonstrate, please file a bug and we can look at it14:06
rharpersmoser: thanks for the heads-up14:06
smoserrharper: yeah, i saw that and your mp. repsonded to the  mp with a suggestion.14:10
rharperohm, thans14:10
ivverharper: ok thanks14:10
rharperivve: thinking about it, write_files in cloud-init does an effective mkdir -p on the dirname of the path to the file;  and if the write failed, you would see the dir but not the content;  there should be an error in /var/log/cloud-int.log   ;14:14
ivvethats exactly what happens14:15
ivve4 out of 8ish files becomes directories. i think it started when i fiddled with default user, but im not sure.. this template is 2500lines with well over 100k chars14:15
ivvewell not entirely true14:17
ivveit creates a dir in place of the file14:17
ivvesay i have /path/to/file it creates /path/to/file/14:17
ivveso instead of a file called file, i have a dir called file14:17
rharperyeah, there should be an error in the cloud-init.log  and if you have just the write_files bits, that'd be helpful to reproduce  (I don't need the actual content of the files, just a version with similar paths, etc14:18
ivveaye, i think i can provide originals14:19
ivveill just make a last check14:19
ivveok think i found it14:25
ivveFile "/usr/lib/python3/dist-packages/cloudinit/util.py", line 1418, in chownbyname14:26
ivveguess ill try with root:root14:26
ivvei think i had that before and it worked14:27
rharperivve: I see, if you don't provide a user:group in write_files content, then it will use the default user and default permissions which is root:root and 064414:36
ivverharper: i provided elasticsearch:elasticsearch which is created in users section in cloudinit along with default14:40
rharperivve: ok, please file a bug and we can sort out what's going on;14:42
rharperthe log should show a write failure, but it's written by root (cloud-init) and then chmod'ed to match the config specified, so its quite strange to have a missing file here14:42
ivvei was checking for spelling errors in elasticsearch but couldn't find any, i will try deploy with root:root and see if thats the problem14:42
ivveperhaps the group isn't created14:43
ivvedamn myself for doing too many changes without commits14:43
ivvehmm think i found the error now14:45
ivveno_user_group: true14:45
ivveand write_files is using the group of the user14:45
ivvewill verify, recreating the stack14:49
ivvebut its odd, because the group exists i groups14:50
ivveelasticsearch:x:1000:elasticsearch14:50
rharperinteresting14:52
ivveso initially i think i am at fault here14:52
ivvebut im suprised as well :)14:52
ivvetrying root:root now anyways just to block out the error14:53
ivvei can always chown at runcmd14:53
tribaalblackboxsw: I saw your branch landed - nice! Thanks. Do you know when the code is planned to hit eoan out of curiosity?14:56
ivverharper: looks like that was the problem. however group and user does exist14:59
ivveand now i know what creates the directories15:05
ivveits docker-compose15:05
ivvemounting stuff that doesn't exist15:05
blackboxswtribaal: I expect I'm uploading today16:01
blackboxswprobably within the next 2 hours. there is another 1-2 branches of ryan's that I'd like to get in too16:01
blackboxswone of them should land in ~15 mins and I'm reviewing the second now16:02
blackboxswtribaal: once uploaded, it won't be in official cloud images until tonight as you know16:02
blackboxsw~tonight :)16:02
tribaalblackboxsw: sure, I'll run an apt-upgrade in our image thingy for preprod16:03
tribaalit won't be *official* but that should be good enough16:03
tribaal(for preprod at least)16:03
blackboxsw+116:03
rharperhttps://paste.ubuntu.com/p/Xx4NpDN4SB/16:09
rharperblackboxsw: ^^16:09
rharperso yeah, v2 to sysconfig is going to write out the DNS0 values, so we may want to confirm if we need to have a resolvconf-only flag16:10
blackboxsw+1 rharper16:10
blackboxswrharper: the master ifcfg template @ https://github.com/openSUSE/sysconfig/blob/master/config/ifcfg.template doesn't mention a supported DNS* config option.16:23
blackboxswthat code I referenced can't possibly be the source of truth (too old)16:23
blackboxswbut it was the best reference I'd found so far16:24
blackboxswalso cat /etc/sysconfig/network/ifcfg.template  on my opensuse leap 15.1 lxc is showing basically the same, no DNS* config options allowed per interface16:25
blackboxswso I'm going with your suggestion, we'll need a resolveconf-only flag for suse to handle net config v2 'global' dns16:26
rharperI don't see robjo around16:27
blackboxswyeah I was trying to tab-complete his nick :/16:27
blackboxswmight send a message to the mailing list once the v2 branch is up16:28
blackboxswget some input if he has time16:28
rharpery16:31
gcstangI'm installing cloud-init on OL 7.7 is there any reason that the user home directory wouldn't have the permissions needed to create?16:44
rharpergcstang: sorry;  cloud-init runs as root, so it has permissions to create directories in /home17:00
rharperwhat do you expect to happen and what is actually happening ?17:01
gcstangI have the user setup in cloud.cfg and during boot the cloud-init.service shows an error that it couldn't run mkdir(name, perm) when creating my user's home directory in /home/17:02
blackboxswgcstang: I think if possible, we'd like to see your userdata reproducing this failure in a bug.   Run the following on your system: sudo cloud-init query userdata   (and make sure it doesn't have any secrets).   If possible a bug filed to https://bugs.launchpad.net/cloud-init/+filebug and attach the tar.gz file emitted by "sudo cloud-init collect-logs"17:03
gcstangblackboxsw the query command returns empty17:09
blackboxswgcstang: ok so on your vm you didn't provide any custom user-data then?17:10
blackboxswlike providing #cloud-config to the vm17:10
blackboxswat launch time17:10
gcstanglike the metadata?17:10
blackboxswgcstang: correct, I was wondering if you were trying change default behavior on the vm you are launching to add new (non-default) users17:11
blackboxswby providing additional configuration metadata to the instance (we call that user-data)17:11
gcstangthe metadata should be supplied by our URL http://169.254.169.254/opc/v1/instance/metadata/ but I don't think cloud-init is finding that17:12
gcstangthe only thing provided is the ssh_authorized_keys17:13
gcstangblackboxsw otherwise the only configuration is in the /etc/cloud/cloud.cfg17:13
blackboxswgcstang: ok, so sudo cloud-init collect-logs will help the most I think as it'll scrape /var/log/cloud-init.log for us (which should have logged the 169.254 crawl cloud-init tried).17:14
blackboxswit17:15
blackboxswwill also show the tracebacks of user dir creation. (I'm wondering if it's opc default user on ubuntu that is causing an issue here)17:15
gcstangblackboxsw tried submitting a bug several times and I get17:26
gcstangTimeout errorSorry, something just went wrong in Launchpad.We’ve recorded what happened, and we’ll fix it as soon as possible. Apologies for the inconvenience.Trying again in a couple of minutes might work.(Error ID: OOPS-44fe7d797c5d2d2342e5ea3320e3fc05)17:26
blackboxswinteresting gcstang I've reflected that to our  IS department to check it out. gcstang can you see edit this bug? https://bugs.launchpad.net/cloud-init/+bug/184181617:28
ubot5Launchpad bug 1841816 in cloud-init "OL 7.7 fails to create a user" [Undecided,New]17:28
gcstangblackboxswI can17:29
blackboxswall yours gcstang edit at will :)17:30
gcstangwont' let me attach, same failure17:30
gcstang20blackboxsw I was able to attach the logs and my cfg17:35
blackboxswrharper: followup sed for https://code.launchpad.net/~raharper/cloud-init/+git/cloud-init/+merge/37191919:50
rharperthx19:50
blackboxswsee what you think. I want to avoid python dependency in that shell script, and avoid a heavy copy/paste/hoist of 37+ lines of code from ds-identify19:50
rharperblackboxsw: I don't see an update on the MP, did you update bug or MP ?19:51
blackboxswhaha unsaved comments can't be seen.19:51
blackboxswfixed19:51
rharpercool19:51
rharperI agree w.r.t python or the bigger shell fix19:51
blackboxswthe resulting sed should support  datasource_list19:52
rharperI can't deny I like the simplicity of the python -c  =)19:53
blackboxswthe following examples :     ds_list   : [1,2,3]    ds_list: [   1,2,3 ]   \s*ds_list:    [1             ,2, 3] etc19:54
blackboxswyeah I agree rharper on the python call, just didn't want to have to sort python2 vs python3 deps in the script19:54
blackboxswtoo19:54
blackboxswor have to fallback to another option if the dep wasn't available at the time for some reason.19:54
rharperyaml wasn't always standard lib right ?19:54
blackboxswrharper: right, it wasn't initially. ~2013 maybe?20:10
blackboxswI just tested that sed suggestion on lxc, purging cloud-init, adding datasource_list: [1,2,3] to /etc/cloud/cloud.cfg.d/90_dpkg.cfg  and it gets correctly reformatted datasource_list: [ 1, 2, 3 ]20:23
blackboxswrharper: I was hoping to hold restarting the cloud-init SRU on the inclusion of this https://code.launchpad.net/~raharper/cloud-init/+git/cloud-init/+merge/371919 .20:30
blackboxswDo you think we should wait for it, or just restart the SRU with the exoscale fixes?20:30
rharperhrm20:31
rharpermy initial thought is to not wait, as tonight or tomorrow will bring another thing to pick up20:31
rharperI also don't think the error is that common, it requires manual manipulation of the file20:31
blackboxswok will kickoff an upload to Eoan of tip of cloud-init then20:32
* blackboxsw wants one quick manual ec2 test on current SRU, just to make sure the world 20:33
rharperblackboxsw: yeah, looks like just two commits, the exoscale and the oracle vnics bits20:33
blackboxswdidn't break20:33
rharperyeah20:33
blackboxswrharper: [ubuntu/eoan-proposed] cloud-init 19.2-24-ge7881d5c-0ubuntu1 (Accepted)20:49
blackboxswtribaal: ^20:49
blackboxswthat'll have exoscale fix20:49
* blackboxsw now tries to regen an SRU including this content too20:50
rharpergreat20:51
blackboxswand xenial bionic disco -proposed SRU upgrade test on ec2 doesn't error out. (there are no specific SRU bugs/code related to Ec2 in this sru)20:55
blackboxswrharper: here's what I was going to do debian/changelog wise for updating the existing SRU21:15
blackboxswhttps://code.launchpad.net/~chad.smith/cloud-init/+git/cloud-init/+merge/37195921:15
blackboxswso I've added a second debian/changelog stanza for the incremented new version. both reference the current SRU bug number21:17
blackboxswI'm not referencing the upstream bug id, because we21:17
blackboxswhave an SRU exception to handle validating that ourselves21:17
blackboxsw"the upstream bug id" == for the exoscale fix21:18
blackboxsw#184145421:18
blackboxswbug #184145421:18
ubot5bug 1841454 in cloud-init "Exoscale datasource overwrites *all* cloud_config_modules" [Undecided,Fix committed] https://launchpad.net/bugs/184145421:18
rharperblackboxsw: hrm, so should changelog have two entries each with the SRU bug # ?21:19
rharperI guess we already pushed to ubuntu/disco21:19
blackboxswrharper: I think I only pushed to chad.smith/ubuntu/disco.    I thought steve suggested that on a previous sru-regression fix we performed. I can separate it out, but then we have 2 changelog entries in the most recent commit that don't have bugs21:20
rharperblackboxsw: you may be right, I'm just asking21:20
blackboxswI can double-check in #ubuntu-devel21:20
chillysurfertrying to build an rpm from cloud-init source, i'm getting the error KeyError: u'RPM_BUILD_ROOT'. i've tried setting the env var to a path on my machine, but still not working. any thoughts?21:29
rharperchillysurfer: I suggest using our tools/run-container21:31
rharperchillysurfer: if you want to do it outside ,then you want to use packages/brpm21:32
chillysurferrharper: yep that's the script i kicked off, packages/brpm21:32
chillysurferand i get that key error21:32
rharperand you have rpm-build and such installed ?21:33
chillysurfernope!21:33
chillysurferi'm guessing that's the problem21:33
chillysurferis there a list of deps for brpm?21:33
rharperchillysurfer: not in there but in tools/run-container21:34
chillysurferrharper: the reason i'm doing this exercise is that it looks like our rpm doesn't inject the PACKAGED_VERSION into version.py21:34
rharperah, it uses tools/read-dependencies21:34
rharperchillysurfer: I would suggest you use the tools/run-container21:35
chillysurferrharper: so it falls back to just VERSION without the package information21:35
rharperthat's how we create our srpms for upload to copr21:35
chillysurferand trying to unwind why that's happening21:35
chillysurferok cool i'll do tools/run-container21:35
rharperso, you can look at tools/run-centos  and see how that calls tools/run-container ,21:35
rharperour ci does this, ./tools/run-centos 7 --srpm --artifact21:36
rharperwhich sets up a centos7 lxd container, puts in the cloud-init source, runs all of the steps to prep the container environment, and then calls brpm with the right flags, and will pull out the srpm to your dir when done21:36
chillysurferrharper: awesome i'll definitely do that21:37
chillysurferrharper: dumb question... what controls the rhel repos? if this is for dumping to copr for centos/fedora, what handles the pkg distribution for rhel regarding cloud-init?21:37
rharperchillysurfer: we have a copr project repo for centos; we've not access to the downstream repos21:38
rharperour CI publishes daily rpms for centos7;  I've a branch to fix up our py3 build so we can publush on newer fedoras and centos8; but that' needs to get reviewed/landed21:39
rharperhttps://code.launchpad.net/~raharper/cloud-init/+git/cloud-init/+merge/36884521:39
rharperwe maintain two other repos on copr, el-stable and el-testing;  el-stable hasn't been updated in quite some time, mosty for centos6 support;  el-testing get's any of our new release (19.1, 19,2) and whenever we do an SRU21:40
rharperchillysurfer: the downstreams decide what to pick up and when;  typically depending on the downstream, some pick up newer cloud-inits at the point releases (19.1, 19.2, etc)  others keep an older release and then backport fixes.21:42
chillysurferah i see21:42
chillysurferthat makes sense21:42
chillysurferrharper: do they pick up source packages?21:42
rharperI suspect they checkout the release tag from git21:43
rharperwe tag and sign point releases21:43
chillysurferrharper: ahhh i see. so in that case you aren't surprised that the packages/redhat/cloud-init.spec.in isn't applied tot he pkg?21:43
chillysurferrharper: the reason i'm bring this all up is that `sed -i "s,@@PACKAGED_VERSION@@,%{version}-%{release}," $version_pys` doesn't seem to be happening, which is specified in cloud-init.spec.in for the rpm21:44
rharperthe spec file is a template, so it get's rendered during the install, IIRC21:45
rharperchillysurfer: see packages/brpm ; it calls tools/read-version and then runs the generate_spec_contents()21:46
chillysurferrharper: right exactly. but if the downstream maintainer of cloud-init isn't calling packages/brpm that would explain why the version isn't getting injected right?21:46
rharperthey don't use our spec file21:46
chillysurferrharper: they use their own spec file? that would explain why PACKAGED_VERSION remains unchanged21:47
rharperchillysurfer: sounds like it could be a downstream bug in their build spec21:48
rharperit's not always clear they want cloud-init --version to match what the package version value is21:48
blackboxswok rharper vorlon confirmed on reusing existing SRU bug21:48
blackboxswwill push xenial and bionic for SRU re-review21:48
rharperfor example if they're backporting features into an older release; they may not want to bump the version value that cloud-init returns21:48
rharperblackboxsw: ok, thanks21:49
rharperblackboxsw: I'm going to run an errand in just a few minutes, when I get back, I'll review the bionic/xenial MPs if you've got them up21:52
blackboxswthanks.rharper  bionic: https://code.launchpad.net/~chad.smith/cloud-init/+git/cloud-init/+merge/371962   xenial: https://code.launchpad.net/~chad.smith/cloud-init/+git/cloud-init/+merge/37196321:54
blackboxswrharper: dugtrio running out of space? https://jenkins.ubuntu.com/server/job/cloud-init-ci/1088/console21:57
rharpermaybe21:57
blackboxswcouldn't create chroot21:57
* blackboxsw logs in to see what we need to clean up21:57
rharperno, maybe just not configured21:57
rharperthat job typically ran on tork, but the queue has been sprayed across additional nodes21:58
rharperso this looks like setup fallout21:58
rharperblackboxsw: send paride a note21:58
rharpermaybe you can reschedule that job on tork21:58
blackboxswrharper: yeah I'll try a reschedule, and will send a note21:58
chillysurferrharper: ah ok that's really good information22:04
tribaalblackboxsw: ack. I'll spin an Eoan template now and will torture it tomorrow22:21
chillysurferrharper: what's the copr repo for cloud-init?22:26
blackboxswchillysurfer: daily builds are https://copr.fedorainfracloud.org/coprs/g/cloud-init/cloud-init-dev/22:26
blackboxswtesting: https://copr.fedorainfracloud.org/coprs/g/cloud-init/el-testing22:27
blackboxswwe'll be updating testing today/tomorrow, but generally we don't updated except when we are performing an ubuntu Stable release update into xenial, bionic, disco (>= monthly)22:28
chillysurferblackboxsw: great thanks!22:44

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