/srv/irclogs.ubuntu.com/2017/04/25/#cloud-init.txt

=== sambetts|afk is now known as sambetts
smoserrharper, so you're good right now with core, right ?13:09
feklehi!13:16
fekleanyone here who can help me with a little cloudinit issue? :)13:16
fekleI want to setup a server with Chef, and added the respective configs to my cloud-init file.13:19
fekleI tested it on ubuntu and centos (in openstack), however it fails on both oss13:19
feklewith the following error:13:19
fekleRunning module chef (<module 'cloudinit.config.cc_chef' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_chef.py'>) failed13:19
fekleI even ran cloud-init in debug mode, but I always only get this one line of log13:20
smoserfekle, can you paste /var/log/cloud-init.log ?13:31
smoserubuntu preferably13:31
feklehttps://pastebin.com/GDRAEygu13:38
feklethis is my clou dinit13:38
smoserfekle, fyi, 'pastebinit' command is available on ubuntu.  'pastebinit file'13:39
fekleoh thanks :) also available on my arch i see13:40
smoserfekle, if you can get me /var/log/cloud-init.log  and /var/log/cloud-init-output.log it'd help.13:40
smoseri realize you're probably worried about sensitive info.13:40
fekleim currently running again, gonna see what i find in the logs13:41
smoserlook for WARN, and there will probably be a stack trace13:41
feklewell that's the thing, there is not stacktrace, neither in cloud-init.log nor in cloud-init-output.log13:44
feklehttps://pastebin.com/EUqSqyYH13:45
smoserthats all that is in /var/log/cloud-init.log ?13:45
feklethat's all I get below the ip/route/interface table thing in the log13:45
feklebefore net device info and route info i only get13:46
fekleCloud-init v. 0.7.5 running 'init-local' at Tue, 25 Apr 2017 13:42:23 +0000. Up 3.23 seconds. Cloud-init v. 0.7.5 running 'init' at Tue, 25 Apr 2017 13:42:25 +0000. Up 6.07 seconds.13:46
smoserthis is 14.04 ?13:47
feklenope, centos 7.313:48
fekleon ubuntu 16.04 we get the exact same error13:48
feklehaven't tried 14.0413:48
fekleno stacktrace on 16.04 either ://13:48
fekleit just fails13:48
feklewithout doing anything13:49
fekleeven better,13:49
fekleIf i go in the vm, delete /var/lib/cloud, and re-run cloud-init -d init && cloud-init -d moudles13:49
fekle*modules13:49
fekleit fails again, no stacktrace13:49
feklebut this time it always creates the correct chef config in /etc/chef13:50
smoserwell, lets focus on 16.04 for now13:50
smoseryou're using the ubuntu images ?13:50
fekleyep13:50
fekleofficial image13:50
smoserok. launch one of those. lets focus on that.13:50
fekleqcow2 from here https://cloud-images.ubuntu.com/xenial/current/13:51
smoserthen, if you can let me in it would be easier. i  understand your hesitancy. i really supect there is *something* in a 16.04 /var/log/cloud-init.log or /var/log/cloud-init-output.log13:51
feklewell the VMs are in a private network ;) but I can send you the full contents of both log files13:52
smosersure.13:53
feklewow, you're right13:55
fekleon ubuntu I get waaaay more logs in /var/log than on centos13:55
fekledidn't show a difference in openstack console tho13:55
feklehttps://pastebin.com/H8JT2pwC13:55
smoser initial_attributes:13:57
smoserthat needs to be a dictionary or not present13:58
fekleyeah, they're empty, but I had the same erorr with some set13:58
smoserwell, this is the error you're seeing now13:58
fekleI'll try again13:58
smoserit should be fine to just remove it13:58
fekleweird, normally an empty dictionary in yaml should be fine, not?13:59
smoser$ python -c 'import yaml; print(yaml.load("foo:\n"))'14:00
smoser{'foo': None}14:00
feklehere's the full log https://pastebin.com/uaLjiRMC14:00
smoserie, you gave it a None type, not a dictionary14:00
smoserits expecting a dictionary14:00
fekleand seing a None Type14:00
feklegot it14:00
smoser(i'm not suggesting that the fail path there should not be more informative, but thats what happened)14:01
smoseronce it statck traced it wasn't going to go further, so launch another with cleaned up entry there.14:01
fekleyeah, it's an understandable error, but it could be handled better, ie print a message warning that it's empty, or just ignoring the nulltype14:02
fekleI'm spawning a new VM with attributes now14:02
rharpersmoser: yes14:03
feklenow i get a new error: https://pastebin.com/ZQqird0D14:05
feklebut nice that cloud-init shows stacktraces on ubuntu, the missing stacktraces on centos really make fixing the issue very hard14:06
fekle@smoser I tried again, but AttributeError: 'UrlResponse' object has no attribute 'encode' is still the error - it's now creating the chef config correctly on the first run tho14:12
smoserfekle, https://git.launchpad.net/cloud-init/commit/?id=482b2746b5914:13
smoserthats the bug. it should be fixed in a 16.04 image newer than 4-20.14:14
smosersorry i ditn just recognize this right away14:14
fekleaaah, awesome, thank you :)14:14
fekleno problem14:14
smosercan you verify what cloud-init you have in the image ?14:14
smoserdpkg-query --show cloud-init14:14
smoserif it is 0.7.9-90-g61eb03fe-0ubuntu1~16.04.114:15
smoserthen it is not fixed correctly14:15
feklecloud-init0.7.9-48-g1c795b9-0ubuntu1~16.04.114:15
smoseryeah. so if you get taht current image http://cloud-images.ubuntu.com/daily/server/xenial/current/ (which is actually http://cloud-images.ubuntu.com/daily/server/xenial/20170424/)14:16
smoserthen it shoudl be good14:16
smoserie, 0424 has that fix14:16
feklehowever, we are using ubuntu only for this testing here, everything else is CentOS14:16
fekleok, I'll download the newwest one14:16
smoserwell, *thats* your problem :)14:16
fekleyeah :D14:16
smoserkidding.14:16
smoserbut yeah, you'll need to somehow get that fix into your centos then14:16
fekleit is .... often enough, believe me14:17
smoseri expect a cloud-init release of 0.7.10 very shortly14:17
fekleyeah, I'll try downloading the newest version of the centos image14:17
smoserso , that should be released and larsks does a really good job of picking stuff up.14:17
fekleawesome14:18
fekleso, just tried with the new image14:32
feklenow i get another crash when instaling chef14:32
feklebut this time it seems to be a chef thing, not an cloud-init issue14:32
feklehttps://pastebin.com/7Kd6gHCC14:33
fekleon Centos it fails too, but no stacktrace, although i think it's the same error14:34
smoserhm..14:37
smoserfekle, so it downloads the 'omnibus_url'14:42
smoserand puts that in a file with execute permission and then tries to execute it14:42
smoserthe default url is14:42
smoser https://www.getchef.com/chef/install.sh14:42
smoseryou had '<censored>' that you were using something else.14:43
smoserso this issue should be recreatable with just:14:43
smoser wget <thaturl> -O out14:43
smoser chmod 755 out14:43
smoser ./out14:43
blackboxswsmoser, powersj do we have and jenkins set up for building centos/rhel or suse packages?14:44
powersjno, but something I wanted to go through with you today.14:44
powersjI've been using an old smoser script to launch a lxd14:44
powersjfor centos7 and wanted to see best way to get that in jenkins to run unit tests and build rpms14:44
powersjfrom there we can decide what we do with them or if we just test that things work14:45
blackboxswpowersj, yeah I feel like it'd be nice to make sure packaging/dependency changes don't break things. I set up an ec2 instance last night to to poke around at things.14:45
fekleyeah, we are using our own script14:45
powersjlxd ftw14:45
feklefor version pinning14:45
feklecolleague forgot to add a shebang, so it didn't run if you don't directly pipe it into bash :p14:45
blackboxswheh14:46
smoserfekle, right. its more functional to just let the kernel decide14:46
smoserthat way, if you put a binary there, it just works14:46
smoseror a python script14:46
smoseri dont expect it to be shell14:46
smoserblackboxsw, the scripts he speaks of are https://gist.github.com/smoser/19e65095b342e98fd4d6466e4d4fa1ac14:47
blackboxswsmoser, ahh I missed that in the url collection effort of 2017 ;) thanks for the pointer14:48
smoseri think we should look into getting a yum / rpm repo of trunk somehow14:48
blackboxswsmoser, I completely agree w/ that14:48
blackboxswsimpler for ci on the final product14:48
smoserblackboxsw, if i just give you my firefox awesomebar history, you'llk have just about the collected bunch of knowledge that i have14:48
smoserthe rest lives in irc logs14:49
rharperlogs4life14:50
rharper% du -sh ~/.xchat2/xchatlogs/14:51
rharper784M/home/rharper/.xchat2/xchatlogs/14:51
rharperthat's getting beefy14:51
fekleI had openstack keystone logs with 20+ million lines of logs, due to forgetting to turn of debug messages :p14:52
fekleloading those logs with lnav is fun14:53
smoser$ du -hs ~/data/bip/14:53
smoser2.7G/home/smoser/data/bip/14:53
rharpersmoser: nice!14:56
rharpersmoser: is you're gzipped ?14:56
smoserno.14:57
smoserthe logs on my local system are a measley 490M or something14:57
smoserand its those that i most often read, i only go to the bip logs if i need to14:57
=== rangerpbzzzz is now known as rangerpb
=== shardy is now known as shardy_afk
=== shardy_afk is now known as shardy
=== sambetts is now known as sambetts|afk

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