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

=== harlowja is now known as harlowja_away
=== harlowja_away is now known as harlowja
=== harlowja is now known as harlowja_away
kwadronauthmmm first time i noticed Module ssh-import-id is verified on ['ubuntu'] distros but not on debian distro. It may or may not work correctly.12:34
kwadronautbut i never noticed any problems with that.12:34
kwadronaut(as in: happy user)12:34
smoserkwadronaut, right. i suspect its fine.15:14
smoserthat one is fairly well known to work, as failures are quite obvious: I CANT SSH IN!15:15
kwadronaut(-:15:27
=== harlowja_away is now known as harlowja
harlowjasmoser yt18:17
harlowjaso far this is what i got18:18
harlowjahttp://bazaar.launchpad.net/~harlowja/cloud-init/ds-openstack/view/head:/cloudinit/sources/DataSourceOpenStack.py18:18
harlowjainput appreciated, need to do a little more shared/common refactoring18:18
smoserhere now.18:18
smoserwooth. i'll take a look.18:19
smoserthanks harlowja 18:19
harlowjanp18:19
smoserharlowja, is there vendor data support ?18:19
harlowjaya18:19
smosersweet18:19
harlowjasmoser does the config-drive have vendor data, was analyzing the nova code, didn't see it18:21
smoserit should have vendor data.18:22
harlowjak18:23
harlowjai'll work on refactoring some more of the common stuff today/tommorow, but let me know if i missed anything major18:38
smoserharlowja, vendordata should be there.18:39
smoser etc/nova/nova.conf.sample18:39
harlowjak18:39
smoser nova/api/metadata/base.py18:39
smosershould get into the config drive or the metadata service > HAVANA18:39
smoser >= HAVANA18:39
harlowjakk18:41
harlowjawill make sure its read in the configdrive code18:41
harlowjagotta share more of that code18:41
harlowjathey are basically reading the same stuff :-P18:41
smoserharlowja, thanks.18:44
harlowjanp18:45
iliyasI want to add a DNS A record for an instance at boot. Our DNS is managed at UltraDNS. Any pointers how to go about with it ?19:17
harlowjailiyas u should just be able to add a script to do that19:17
harlowjahttp://cloudinit.readthedocs.org/en/latest/topics/examples.html#run-commands-on-first-boot 19:18
harlowjathats one example19:18
harlowjaor http://cloudinit.readthedocs.org/en/latest/topics/format.html#user-data-script19:18
iliyasharlowja: Thanks. If I want to use the 2nd approach (user-data-script) where should be the script place ?19:20
iliyasplaced*19:20
harlowjadepends on the cloud u are running in :)19:20
harlowjaopenstack, ec2?19:20
harlowjaother19:20
iliyasCloudStack19:20
harlowjahmmm, k, i'm not so sure about that one then19:20
harlowjabut typically there is some way to pass in a user-data file19:21
harlowjaso u'd pass it in via that mechanism19:21
harlowjacloudstack documentation should tell u how i would think19:21
iliyasI used the 1st approach (run-commands-on-first-boot) to setup the hostname by querying the metadata URL wherein I placed the script on the VM filesystem (/scripts/update_hostname.sh)19:22
smoseriliyas, so pretty much anything you can do by modifying the image prior to boot, you can do via user-data in cloud-init.19:23
harlowja*as long as its a relatively recent version of cloud-init19:24
smoserwell, pretty much anything supported boothooks19:26
smoserso you can drop a file down inside.19:26
smoserbut CloudStack support came more recently i think. 19:27
iliyasYes smoser. CloudStack support has been added recently.19:27
dgarstang1Anyone awake? :) 20:43
dgarstang1I have such bad luck with cloud-init. Is there any reason stuff in /etc/cloud/cloud.cfg.d would be totaly ignored?20:44
harlowjadgarstang1 depends, could be many reasons, do u have log files that u can share?20:44
dgarstang1harlowja: Here ya go... http://pastebin.com/aAfJY1az20:46
dgarstang1not much to it20:47
harlowjahmmm, how about /var/log/cloud-init.log20:47
dgarstang1I'm expecting to see the final message. The first two lines of the pastebin are from /var/log/cloud-init.log20:47
harlowjado u have the rest of /var/log/cloud-init.log?20:47
dgarstang1harlowja: Sure. Is anything before the last reboot relevant?20:48
harlowjacould be20:48
dgarstang1kk, here http://pastebin.com/YReDs9Ps20:48
harlowjadgarstang1 how cloud-init works is that not all modules will be ran repeatly (Every boot)20:48
dgarstang1harlowja: not even final_message ?20:49
dgarstang1Also, I'm on Google Compute 20:49
harlowjak, on google compute might not be so helpful, never used that myself20:49
harlowja*especially if they modified cloud-init20:50
harlowjaso the final-message should always come out20:50
dgarstang1I know cloud-init doesn't have a data source for GCE, but it wasn't clear before I grabbed the one referred to by http://comments.gmane.org/gmane.linux.debian.cloud/965 that if it was failing to run anything was because it was on GCE, or for some other reason20:50
harlowjaya, logs not showing to much20:50
dgarstang1harlowja: They seldom do20:50
harlowjaif u turn on debug logging then they will show lots more :-P20:50
dgarstang1the ec2 errors certainly went away20:50
dgarstang1how?20:51
harlowjaoh, nm20:51
harlowjau already on debug level, lol20:51
dgarstang1I changed the Data Source to NoData, but as I said, it still wasn't doing anything. is that because GCE breaks it, or for some other reason? 20:51
harlowjaunsure, it almost looks like they aren't running all the cloud-init stages20:52
dgarstang1i don't need the GCE functionality really. So, if setting the datasource to NoData would at least let scripts run, that's fine20:52
harlowjaall i see is 'start' and 'start-local' running20:52
dgarstang1harlowja: and this is with debug log. See my frustration?20:52
harlowjaya, how cloud-init is installed in the GCE images though cloud-init wouldn't be aware of20:52
harlowjawhat images are those?20:52
dgarstang1harlowja: custom made with packer20:53
harlowjaoh, then i have no idea :-P20:53
harlowjait appears like the install of cloud-init isn't right20:53
dgarstang1harlowja: what makes you say that?20:53
harlowjalogs aren't showing more than start and start-local running20:54
harlowjatypically these are the stages 20:54
harlowjahttp://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/files/head:/sysvinit/redhat/20:54
dgarstang1harlowja: just a package... 0.6.3-0ubuntu1.920:54
dgarstang1Argh20:55
harlowjaya, ubuntu uses upstart, so it could be not configured/using the right ocnfig files20:55
harlowja*config20:55
harlowjahttp://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/files/head:/upstart/20:56
harlowjasmoser might be able to help with those20:56
dgarstang1harlowja: it's starting on boot obviously cuz it's logging stuff20:56
harlowjaya, 1 stage is running20:56
harlowjabut not the 'config' stage or the 'final' stage20:56
harlowjaso something seems off20:57
dgarstang1is good? http://pastebin.com/2cJ0hiVJ20:58
harlowjaya, but thats not connected to the upstart system20:59
harlowjadifferent config20:59
dgarstang1http://i.imgur.com/A9tp2w7.jpg20:59
dgarstang1hm20:59
harlowjaha21:00
dgarstang1i suppose I could post a link to a y u no meme, but meh21:00
harlowjabut then u could have that meme for all software ;)21:00
dgarstang1cloud-init is especially frustrating21:01
dgarstang1not so good logging, not so good docs21:01
* harlowja improvements welcome :)21:01
smoserdgarstang1, its ubuntu, right?21:02
dgarstang1smoser: yep21:03
* dgarstang1 takes a deep breath21:03
smoserthat pastebin is odd.21:03
smosercloud-init was being run over and over again21:03
dgarstang1smoser: maybe cuz it was exiting !0 ?21:04
dgarstang1This is on GCE... Would using GCE with NoDataSource work or just outright barf?21:04
harlowjaGCE, use openstack ;)21:05
smoserit should work.21:05
harlowja*j/k21:05
dgarstang1harlowja: que?21:05
harlowjanm21:05
dgarstang1*squinty eye*21:05
dgarstang1we have ... contractual obligations. :)21:05
smoseryou installed an ubuntu package ?21:06
dgarstang1smoser: for cloud-init? Yah... for precise. 0.6.3-0ubuntu1.921:06
dgarstang1smoser: Tried to get the one from debian experimental as it apparetly has gce support, but it didn't want to install on precise21:07
smoserdgarstang1, is rsyslog installed?21:09
dgarstang1Yep21:11
dgarstang1I just restarted a new instance of the same image. I'm not sure if a better approach is to use no data source, or to use the patched GCE one21:12
smoserok. looking at this paste http://pastebin.com/YReDs9Ps21:13
smoseryou know that for it to find the nocloud datasource, you have to populate /var/lib/cloud, right?21:13
smoseri think that the behavior you're seeing is what you got on 0.6.3 when there was no datasoruce found.21:15
smoserthere was no 'none' datasource, so the subsequent portions wouldn't end up running.21:15
dgarstang1one sec21:15
smoserhttp://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/files/934/doc/examples/seed21:15
smoserread that. 21:15
smoseror you may be able to use 'ci-tool' 21:16
smoserhttp://bazaar.launchpad.net/~smoser/cloud-init/ci-tool/view/head:/ci-tool21:16
smoserwhich basically can write a /var/lib/cloud/data/seed dir for you.21:16
dgarstang1i have to populate /var/lib/cloud ?21:16
smoser"NoCloud" is a datasource, but it has to have data (metadata and userdata).  the "no cloud" part is just that its prvided by you.21:16
dgarstang1smoser: maybe I should try the GCE patch then?21:17
smoserwell, newer cloud-init will probably have dependency issues on 12.04.21:17
dgarstang1This is it... http://pastebin.com/GjDWFGMj21:17
dgarstang1no, just drop that file in...21:18
smoserthats not terribly likely to work/21:18
dgarstang1Oh21:18
smoserif it was written for newer cloud-init21:18
dgarstang1ok, back to no data source then21:18
smoserthen it wont "just work" on 12.04's version21:18
smoserprobably would'nt be too hard to port it to 0.6.3.21:19
dgarstang1populate /var/lib/cloud... looking for docs...21:19
smoserbut i pointed at the docs above.21:19
dgarstang1one sec21:19
dgarstang1is http://bazaar.launchpad.net/~smoser/cloud-init/ci-tool/view/head:/ci-tool the only way to populate /var/lib/cloud? 21:24
smoserno. you can do it by hand. its very easy. 21:24
dgarstang1doc? :)21:25
dgarstang1http://cloudinit.readthedocs.org/en/latest/topics/dir_layout.html ?21:25
smoserhttp://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/files/934/doc/examples/seed21:25
dgarstang1oic21:25
dgarstang1do I need user-data ?21:26
dgarstang1Actually I have a /var/lib/cloud with stuff in it already http://pastebin.com/BChLFcjt21:27
smosersudo sh -c 'd=/var/lib/cloud/seed/nocloud-net/; mkdir -p $d; echo "instance-id: i-abcdefg" > $d/meta-data; printf "%s\n%s\n" "#!/bin/sh" "echo hi mom" > $d/user-data'"#!/bin/sh"; 21:27
smoserbah. the '!21:27
smosersudo sh -c 'd=/var/lib/cloud/seed/nocloud-net/; mkdir -p $d; echo "instance-id: i-abcdefg" > $d/meta-data; printf "%s\n%s\n" "#!/bin/sh" "echo hi mom" > $d/user-data"#!/bin/sh"; 21:27
dgarstang1so, if I have stuff in /var/lib/cloud already, I'd say thats' not the issue?21:27
smoserno. you aren't finding a datasource.21:28
smoserbecause there *is not a datasource*21:28
smoserand i'm showing you how to make one.21:28
dgarstang1not following context.... this isnt amazon. There is no user-data or instance-id21:30
dgarstang1modifying...21:30
smoseryou're giving it one.21:31
dgarstang1smoser: they don't contextually exist in gce.21:32
smoseri really don't understand what you're wanting.21:33
smoserhttp://pastebin.com/GjDWFGMj21:33
smoserclearly *does* have a instance-id21:33
smoser(at least the metadata service has something labeled 'instance-id')21:33
smoserbut thats not even improtant here.21:33
smoserif you're wanting to run cloud-init, then you need to have it find a datasource21:33
smoserand you can create a directory in /var/lib/cloud/... that it will see as a datasource21:34
dgarstang1smoser: Can I just create an empty /var/lib/cloud/nocloud-net?21:34
smoserthere was something there before you put it there?21:34
smoseryou can rm -Rf /var/lib/cloud if you want21:34
dgarstang1smoser: yes. http://pastebin.com/BChLFcjt21:35
smoserit will all be put back on boot21:35
smoserthat all was created by cloud-init21:35
smoserthe *seed* is not crated by cloud-init21:35
smoserit is created by you21:35
dgarstang1k21:35
dgarstang1I created /var/lib/cloud/seed/nocloud-net, changed the data source to datasource_list: [ NoCloud ] ...21:36
dgarstang1added a final_message... rebooted... it's not running it21:38
dgarstang1Did not find data source. searched classes: ['DataSourceNoCloudNet']21:38
dgarstang1I don't know why it even mentions DataSourceNoCloudNet. I certainly didn't specify it21:38
dgarstang1yay. running21:40
smoserok. for what its worth, i just pushed a couple small changes to ci-tool.21:56
smoserand now:21:56
smoser sudo ./ci-tool reset --full21:56
smoser sudo ./ci-tool seed21:58
smoserwill populate the datasource and remove other state that might have been present.21:58
dgarstang1smoser: seems I can get away with the directory and some dummy data. I need to keep it simple as packer is running this and I don't want to have to store, and push out an entire script22:08
=== harlowja is now known as harlowja_away
=== harlowja_away is now known as harlowja

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