/srv/irclogs.ubuntu.com/2014/01/08/#cloud-init.txt

=== harlowja is now known as harlowja_away
smoserlotia, yes, you can do that or give user-data to do it.15:17
smoserie, something that isn't well understood / known is that cloud-config provided by userdata == cloud-init configuration files in /etc/cloud/cloud.cfg.d/15:17
=== harlowja_away is now known as harlowja
=== medberry is now known as med_
harmwharlowja: I read yahoo switching to https on e-mail, probably related :)21:10
harlowjaharmw i think so :-P21:43
alevyHI all, my ssh key does not seam to get imported from openstack when cloud-init runs. How would I debug this?21:46
harlowjaalevy which datasource are u using with openstack?21:47
harlowjaconfig drive?21:48
harlowjaother?21:48
harlowjawhat version of cloud-init 21:48
alevyharlowja: im not sure what data source, how do I check? 0.7.321:51
harmwcloudinit will tell you which sources it tried21:52
harlowjado u know how the openstack u are using is setup?21:52
harlowjathat will affect which datasource cloud-init should try21:52
harlowjabut as harmw said, the console log of openstack should also tell u what was being tried21:52
harmwyou didn't forget to pass --key mykeyname on booting the instance alevy :)21:53
harlowjaand if not /var/log/cloud-init.log usually has more21:53
alevyharmw: started it from the console21:53
alevyharlowja: it is a nebula one openstack cloud21:54
alevyone image is working the other isn't...21:54
harmwnova boot --flavor bla [..] --key-name thisismykey 21:54
harmwah21:54
harlowjaalevy hmmm, then it could vary, do u know what the nebular people recommend for images?21:54
smoseralevy, you can check to see if your key is there in 'ec2metadata'21:54
harlowjais that image known to work (that they are providing)21:54
harmwwhich image works, which one doesn't?21:54
alevythe one someone downloaded but I am trying to build my own (for certain rrsons)21:54
smoseri think nebula use ubuntu cloud images (even pull them in by default)21:55
alevyboth centos 6.4 with the same cloud-init package installed and same config21:55
harlowjaalevy build your own, hmmm21:56
alevyCan i run it interactively to see what is happening, I dont understand what is in the logs...21:56
harlowjaalevy is it possible for u to pastebin the logs somewhere (filter out anything u don't want to show?)21:56
alevysmoser: how do I check that21:56
alevyharlowj: sure21:56
smoseralevy, in ubuntu you'd have a package 'ec2metadata'21:58
smoserjust run it and it will crawl the metadata21:58
smoserfrom inside the system (assuming you got in, but you clearly might not bee able to)21:58
alevysmoser: bash: ec2metadata: command not found22:01
alevysmoser: centos22:01
smoserah. well then22:01
harlowjalogs at /var/log/cloud-init.log should be useful here22:02
harlowja*if any22:02
smoser$ curl -q http://169.254.169.254/latest/meta-data/public-keys; echo22:02
smoser0=brickies22:02
alevycurl -q http://169.254.169.254/latest/meta-data/public-keys;22:03
alevy0=alevy22:03
alevylooks ok there...22:03
alevydoes cloud-init care about selinux?22:07
harlowjadefine 'care'?22:09
smoserit should handle it.22:11
smoseri have to run22:11
smoserlater.22:11
alevyharlowja: i noticed one image has it enabled and the other doesn't, just looking for differences...22:16
harlowjakk, can u also check the diff between the cloud.cfg files @  /etc/cloud/cloud.cfg 22:17
harlowjaa diff there might be part of the issue22:17
alevyharlowja: nothing commented out matters right?22:18
harlowjaright22:18
alevyok they are identical then22:19
harlowjahmmm, k, thats pretty odd22:19
alevyharlowja: is there a way to run cloud-init and see if it is puking or something?22:20
harlowjaya, u can run cloud-init just via $ cloud-init22:20
alevydo indents matter?22:20
alevyi.e. "-" vs. " -"22:20
harlowjapotentially22:21
harlowjayaml is white space sensitive22:21
alevygr22:21
alevyok i see what may be the problem then22:21
harlowjakk22:21
alevyyaml is valid and nothing changed when I re-ran cloud-init22:27
harlowjavalid yaml could still mean the yaml isn't right, if the spacing is right thats usually valid, but it might still be off22:31
harlowjau should be able to run $ cloud-init single 'module-name'22:31
harlowjaand then see if one is dying22:31
harlowjaperhaps run just the ssh one22:31
alevyharlowja: cloud-init single --name ssh ?22:33
harlowjai think so22:34
alevycloud-init single --name 'ssh' --frequency once22:35
alevythat did something...22:35
alevygenerated public private keypair22:36
alevyhow do I test the fetch of keys from openstack?22:36
harlowjaso i think u should be able to run $ cloud-init init22:37
harlowjaand that will rerun the fetching part22:37
alevydoes not seem to22:37
harlowjaany output at all?22:38
alevyjust prints out the networking stuffs22:38
harlowjak, its probably noticing u already fetched the data22:38
harlowjacan u check /var/lib/cloud/22:38
harlowjaif u temporarily move that directory to somewhere else, it should re-run22:38
harlowjathat directory is where cloud-init stores alot of its data22:39
harlowjaespecially under /var/lib/cloud/instance22:39
alevyok moved it and now it prints the networking and generates the keys again but says Failed to generate ecdsa key22:40
harlowjaok, afaik rhel has issues with the ecdsa key, but the rest of the keys should be getting made, 22:41
harlowjathe question i guess is did it put your keys in place22:41
harlowjamaybe try the cloud-init single --name ssh  again22:41
alevyit makes the ones in /etcssh/ for sure i just checked the fingerprint22:42
harlowjak22:43
alevyis the ssh module the one that fetches the key from openstack?22:43
alevyhttp://cloudinit.readthedocs.org/en/latest/topics/modules.html22:44
alevythat is totally empty.. ha ha22:44
harlowjahmmm, ya, thought that had some data in it22:45
harlowjathe modules are @ http://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/files/head:/cloudinit/config/22:45
alevyhttps://gist.github.com/832602522:48
alevythat is the log btw, gist came back up22:48
harlowjaah, k22:48
harlowjahmmm, ya, its using 'iid-datasource-none' which confuses me22:50
alevywhat does that mean?22:51
harlowjaits supposed to find the ec2 one22:51
harlowjadatasources provide where cloudinit gets info from, ec2 being one22:51
harlowjathe none one is like a fallback22:51
alevydo i need to set that in cloud.cfg?22:53
alevylet me paste that too22:53
alevyhttps://gist.github.com/832610522:53
harlowjau can, it might help reduce the set of ones it will try22:54
harlowjaadding the following will help reduce the options22:54
harlowja# Only these datasources will be attempted (in order)22:54
harlowjadatasource_list:22:54
harlowja - ConfigDrive22:54
harlowja - Ec222:54
harlowja - None22:54
harlowjaor something like that22:54
harlowjau are running the '- disable-ec2-metadata' module though22:55
harlowjathat alters iptables, so that means u can't probably run cloud-init twice22:55
harlowjawithout unblocking that iptables filter22:55
harlowjaprobably for testing disable that module running22:55
alevyok i disabled that module22:59
alevyand ran again 22:59
alevystill not fetching any keys22:59
alevyhttps://gist.github.com/832627023:00
alevyhttps://gist.github.com/832627223:00
harlowjadid u make a new instance? or the same one?23:01
alevysame one. should I make a new one?23:01
harlowjaya, if that module already ran, it turned on an iptables rule that stops the metdata from being fetched23:02
alevycan i just flush iptables?23:02
harlowjaprobably23:03
alevyseems to still be using None23:04
alevyok I have to run23:05
alevyi guess i just need to keep looking?23:05
harlowjaya, make sure u are removing /varl/lib/cloud each time u try to re-run23:06
harlowjai'd restrict what datasources are allowed to23:06
harlowjato avoid all these other ones being activated23:06
alevyok23:07

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