/srv/irclogs.ubuntu.com/2018/07/11/#cloud-init.txt

caribousmoser: thank you very much, you've just saved me hours of investigationn08:07
caribouso I went ahead & tested the kernel in -proposed which does fix the bug, so it's now verification-done08:08
caribouI'll go back to working on adapting the MP08:08
=== otubo1 is now known as otubo
smosercaribou: \o/11:25
smosercaribou: let me know if you need anything. its always ok to bother me.11:39
smoserrobjo: https://bugs.launchpad.net/cloud-init/+bug/1779139 ?11:48
ubot5Ubuntu bug 1779139 in cloud-init "metadata api detection runs before network-online" [Undecided,Incomplete]11:48
smoseryou see that ?11:48
robjosmoser: yes, there is also an euqivalent openSUSE bug11:49
robjoI've not had time to poke at this.11:49
robjoWhile the proposed patch of "After=network-online.target" supposedly avoids the problem I know there are other issues related to waiting for the network11:50
robjoSO for now I removed the patch again from the SUSE package11:50
robjoI think this may also be partially related to the dhcp client issue11:51
smoserrobjo: which is dhclient issue ?14:18
robjosmoser: I couldn't find it14:19
smoseri do remember discussing that. and ultimatelly i would like to have a sufficient python dhclient in cloud-init.14:19
robjobut cloud-init uses dhclient to make a request and then looks at the lease file14:19
robjowell that fails on SUSE because the interface is controled by wicked14:20
robjodiscussed the dhclient issue recently with blackboxsw and he said he'd put it on the agenda for the summit14:20
robjoI added some notes to the bug, let me try again to find it14:21
smoserbut that proved to be more than a afternoon worth of work. all the example python dhclients oddly expect that your interface already has an address14:21
smoser:14:21
smoser:)14:21
robjoHere it is lp#173322614:22
robjohttps://bugs.launchpad.net/cloud-init/+bug/173322614:23
ubot5Ubuntu bug 1733226 in cloud-init "cloud-init-local service fails on SUSE distros" [Undecided,New]14:23
smoserthanks robjo14:35
=== telling_ is now known as telling
lorddoskiashello, how does cloud-init detect first boot? if i have tested it locally ona an image, what do i have to do to ensure that the next time the image is run (in the cloud) first boot directives will also run15:37
smoserlorddoskias: "per instance" things are done when the instance-id found changes.15:41
smoserinstance-id varies by "datasource"15:41
smoserthe goal is that you do not have to 'clean' anything.15:42
lorddoskiassmoser: so what i did is locally configure cloud-init and then execute systemctl start cloud-init-local systemctl start cloud-init etc15:43
lorddoskiasafter i've verified that everything is working i uploaded this image to a private openstack-based cloud15:44
smoserthat should be sufficient, yes.15:44
lorddoskiaswhen i run a new instance, based on that image cloud-init will work as if it's the first time this image is booted?15:44
smoseryou could also test locally by attaching a config-drive (openstack) or a "NoCloud" data disk.15:44
smoserbut yes, it shoudl re-generate ssh keys, and other "per instance" things. as if it was new.15:45
smoserif you want to clean state just to remove additional unused data, you can do that too... rm -Rf /var/lib/cloud/15:45
lorddoskiasright. Now another question regarding the users module i can see in the docs that users should be configured like so : users: - name: root15:45
lorddoskiashowever, the default config has users: - root15:45
smoserthe default config from where?15:46
lorddoskiasfrom opensuse15:46
smosertrunk does not have that... it uses a per-distro user.15:46
lorddoskiasmy question is what's the differente between having - name: root and - root15:46
smoserwell, ... if it does work with just 'root' as teh value , then it will probaly just take defaults from system_info15:49
smoserand you can speify moer values with the name: username15:49
smoserand such15:49
lorddoskiasdoesn't it work the same in the usptream cloud-init i.e. you can have "- blah" or "- admin" or whatever?15:50
lorddoskiaseven here the documentation (https://cloudinit.readthedocs.io/en/latest/topics/examples.html?highlight=system_info#including-users-and-groups) gives examples as : users: - default -bob15:50
smoserprobably15:51
lorddoskiasbut this syntax is never explained15:51
smoserwell, the syntax is explained in the link you provide d ('Valid Values')15:52
smoserso if you say that15:52
smoser- users: [root]15:52
sebaI have a VM where cloud init is run on every boot and I don't know where to start debugging. I just want it to be run once and not to regenerate ssh-keys on every boot.15:52
smoserworks, i believe you. it probalby just picks 'root' as 'name:' and takes defautls for other fields.15:52
sebaon first boot it finds its datasource (iso) and everything works fine. when I reboot it searches for different datasources (iso is not attached anymore)15:53
smoserbut i personally would take the morem verbose format.15:53
lorddoskiassmoser: yeah, makes sense15:54
smoserseba: https://git.launchpad.net/cloud-init/tree/doc/examples/cloud-config.txt15:55
smoseryou want 'manual_cache_clean: True'15:55
smoseror just15:55
sebahm. okay, I can see why I want this parameter. I just wonder why I didn't encounter this problem earlier15:57
smosernever mind 'or just'.  you can write that to a file in /etc/cloud/cloud.cfg.d/15:57
smoseryou had the cdrom there subsequently? or didnt notice it? if you're running bionic+ cloud-init should completely disable itself on subsequent runs.15:57
sebadebian stretch15:57
smoserit depends on cloud-init version and such.15:58
sebaI've also run it on xenial and bionic15:58
smoseron ubuntu, the cloud-init-generator will disable cloud-init if it does not find a datasource15:58
sebacurrently cloud-init 0.7.9-2 on the host I encounter problems with15:58
smoserthats older than i'd care to make guesses on15:59
smosermanual_cache_clean is what you want though. and that goes back 0.7.9 for sure15:59
sebanoted and thx for the suggestion, will try it :)15:59
sebasmoser, works for me, thx again16:06
=== rezroo1 is now known as rezroo
blackboxswhrm empty /etc/os-release on the copr build images. I'm adding a build to list /etc to see if we have other version files we can source or maybe use lsb_release?18:45
smoseris that there?18:45
blackboxswyeah it looks there, just load_file looks like zero length18:45
blackboxswmaybe check /etc/lsb-release18:45
blackboxswor lsb_release util as an option.18:46
blackboxswchecking to see if that util is even there18:46
blackboxswbut I have to wait 20 mins on each build/failure attempt18:46
blackboxswhttps://copr.fedorainfracloud.org/coprs/blackboxsw/cloud-init/build/776371/18:46
smoseri doubt it has lsb_release.18:46
blackboxswmore specifically https://copr-be.cloud.fedoraproject.org/results/blackboxsw/cloud-init/epel-6-x86_64/00776371-cloud-init/build.log.gz18:47
smoserugh19:02
smoserpowersj: why green here19:02
smoser https://jenkins.ubuntu.com/server/view/cloud-init,%20curtin,%20streams/job/cloud-init-integration-proposed-a/26/console19:02
powersjbecause the last command was green19:03
powersjugh19:03
blackboxswfound centos-release system-release redhat-release files in centos 6, might leverage one of them.19:13
blackboxswredhat-release is probably the most ubiquitous as I recall that from a loooong time ago in HP-land19:13
blackboxswthis build, when run should give us all the content we need for any /etc/*release file in the failed centos6 env19:14
dpb1blackboxsw: that's whats broken the build?19:14
blackboxswdpb1: there is an /etc/os-release in copr centos6 images (and various fedora rawhide images). but it is an empty file19:15
blackboxswso the build can't succeed in running get_linux_distro19:15
dpb1blackboxsw: is it acceptable to just stub it out to get the build passing?19:15
blackboxswdpb1: we can stub it out, or make it also check for empty content in /etc/os-release.19:17
blackboxswI'll have a fix for this today no prob. but just waiting on a copr build run19:17
* dpb1 nods19:17
blackboxswhttps://copr.fedorainfracloud.org/coprs/blackboxsw/cloud-init/build/776389/ should have enough info for me to get a fix that will work for centos/redhat envs19:17
blackboxsweasy to just source a different /etc/redhat-release file if available instead I think19:18
smoserthis garbage is why its deprecated in python :)19:19
powersjsmoser: pushed a fix for the proposed testing19:24
blackboxswyeah our get_linux_distro is basically going to re-write platform.dist() as we start supporting more oses19:25
smoserfor a more limited set of distros, yes.19:27
blackboxswyeah , it's not too bad19:27
blackboxswhttps://pastebin.ubuntu.com/p/7xVR3dQ2yv/.... ok. something to work with. but not optimal19:35
* smoser will check back in later. our launch-softlayer doesn't 'just work' for launching --proposed unfortunately. need to fix that somehow.19:40
=== blackboxsw changed the topic of #cloud-init to: Reviews: http://bit.ly/ci-reviews | Meeting minutes: https://goo.gl/mrHdaj | Next status meeting: Monday 7/2 16:00 UTC | cloud-init 18.3 released (06/20/2018)
blackboxswsmoser: ok, build worked for centos6, not for rawhide https://copr-be.cloud.fedoraproject.org/results/blackboxsw/cloud-init/fedora-rawhide-i386/00776423-cloud-init/build.log.gz22:13
blackboxswBUILDSTDERR: /var/tmp/rpm-tmp.vOrrcj: line 31: /usr/bin/python: No such file or directory .... hrm22:16
blackboxswor rather:                mockbuild.exception.Error: Command failed:22:20
blackboxsw # /usr/bin/systemd-nspawn -q -M 39c142373fa449acb013a47ca64b0cf4 -D /var/lib/mock/775457-fedora-rawhide-i386-1531181651.602050/root -a --capability=cap_ipc_lock --bind=/tmp/mock-resolv.erqniz1j:/etc/resolv.conf --setenv=TERM=vt100 --setenv=SHELL=/bin/bash --setenv=HOME=/builddir --setenv=HOSTNAME=mock --setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin --setenv=PROMPT_COMMAND=printf "\033]0;<mock-chroot>\007"22:20
blackboxsw--setenv=PS1=<mock-chroot> \s-\v\$  --setenv=LANG=en_US.UTF-8 -u mockbuild bash --login -c /usr/bin/rpmbuild -bb --target i686 --nodeps /builddir/build/SPECS/cloud-init.spec22:20
blackboxsw... bad paste sorry22:20
blackboxswyeah so the overall build from spec is failing, but no tracebacks about why in rawhide ... hrm22:24

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