=== harlowja is now known as harlowja_away === harlowja_away is now known as harlowja === harlowja is now known as harlowja_away [12:34] hmmm 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] but i never noticed any problems with that. [12:34] (as in: happy user) [15:14] kwadronaut, right. i suspect its fine. [15:15] that one is fairly well known to work, as failures are quite obvious: I CANT SSH IN! [15:27] (-: === harlowja_away is now known as harlowja [18:17] smoser yt [18:18] so far this is what i got [18:18] http://bazaar.launchpad.net/~harlowja/cloud-init/ds-openstack/view/head:/cloudinit/sources/DataSourceOpenStack.py [18:18] input appreciated, need to do a little more shared/common refactoring [18:18] here now. [18:19] wooth. i'll take a look. [18:19] thanks harlowja [18:19] np [18:19] harlowja, is there vendor data support ? [18:19] ya [18:19] sweet [18:21] smoser does the config-drive have vendor data, was analyzing the nova code, didn't see it [18:22] it should have vendor data. [18:23] k [18:38] i'll work on refactoring some more of the common stuff today/tommorow, but let me know if i missed anything major [18:39] harlowja, vendordata should be there. [18:39] etc/nova/nova.conf.sample [18:39] k [18:39] nova/api/metadata/base.py [18:39] should get into the config drive or the metadata service > HAVANA [18:39] >= HAVANA [18:41] kk [18:41] will make sure its read in the configdrive code [18:41] gotta share more of that code [18:41] they are basically reading the same stuff :-P [18:44] harlowja, thanks. [18:45] np [19:17] I 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] iliyas u should just be able to add a script to do that [19:18] http://cloudinit.readthedocs.org/en/latest/topics/examples.html#run-commands-on-first-boot [19:18] thats one example [19:18] or http://cloudinit.readthedocs.org/en/latest/topics/format.html#user-data-script [19:20] harlowja: Thanks. If I want to use the 2nd approach (user-data-script) where should be the script place ? [19:20] placed* [19:20] depends on the cloud u are running in :) [19:20] openstack, ec2? [19:20] other [19:20] CloudStack [19:20] hmmm, k, i'm not so sure about that one then [19:21] but typically there is some way to pass in a user-data file [19:21] so u'd pass it in via that mechanism [19:21] cloudstack documentation should tell u how i would think [19:22] I 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:23] iliyas, so pretty much anything you can do by modifying the image prior to boot, you can do via user-data in cloud-init. [19:24] *as long as its a relatively recent version of cloud-init [19:26] well, pretty much anything supported boothooks [19:26] so you can drop a file down inside. [19:27] but CloudStack support came more recently i think. [19:27] Yes smoser. CloudStack support has been added recently. [20:43] Anyone awake? :) [20:44] I have such bad luck with cloud-init. Is there any reason stuff in /etc/cloud/cloud.cfg.d would be totaly ignored? [20:44] dgarstang1 depends, could be many reasons, do u have log files that u can share? [20:46] harlowja: Here ya go... http://pastebin.com/aAfJY1az [20:47] not much to it [20:47] hmmm, how about /var/log/cloud-init.log [20:47] I'm expecting to see the final message. The first two lines of the pastebin are from /var/log/cloud-init.log [20:47] do u have the rest of /var/log/cloud-init.log? [20:48] harlowja: Sure. Is anything before the last reboot relevant? [20:48] could be [20:48] kk, here http://pastebin.com/YReDs9Ps [20:48] dgarstang1 how cloud-init works is that not all modules will be ran repeatly (Every boot) [20:49] harlowja: not even final_message ? [20:49] Also, I'm on Google Compute [20:49] k, on google compute might not be so helpful, never used that myself [20:50] *especially if they modified cloud-init [20:50] so the final-message should always come out [20:50] I 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 reason [20:50] ya, logs not showing to much [20:50] harlowja: They seldom do [20:50] if u turn on debug logging then they will show lots more :-P [20:50] the ec2 errors certainly went away [20:51] how? [20:51] oh, nm [20:51] u already on debug level, lol [20:51] I 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:52] unsure, it almost looks like they aren't running all the cloud-init stages [20:52] i don't need the GCE functionality really. So, if setting the datasource to NoData would at least let scripts run, that's fine [20:52] all i see is 'start' and 'start-local' running [20:52] harlowja: and this is with debug log. See my frustration? [20:52] ya, how cloud-init is installed in the GCE images though cloud-init wouldn't be aware of [20:52] what images are those? [20:53] harlowja: custom made with packer [20:53] oh, then i have no idea :-P [20:53] it appears like the install of cloud-init isn't right [20:53] harlowja: what makes you say that? [20:54] logs aren't showing more than start and start-local running [20:54] typically these are the stages [20:54] http://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/files/head:/sysvinit/redhat/ [20:54] harlowja: just a package... 0.6.3-0ubuntu1.9 [20:55] Argh [20:55] ya, ubuntu uses upstart, so it could be not configured/using the right ocnfig files [20:55] *config [20:56] http://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/files/head:/upstart/ [20:56] smoser might be able to help with those [20:56] harlowja: it's starting on boot obviously cuz it's logging stuff [20:56] ya, 1 stage is running [20:56] but not the 'config' stage or the 'final' stage [20:57] so something seems off [20:58] is good? http://pastebin.com/2cJ0hiVJ [20:59] ya, but thats not connected to the upstart system [20:59] different config [20:59] http://i.imgur.com/A9tp2w7.jpg [20:59] hm [21:00] ha [21:00] i suppose I could post a link to a y u no meme, but meh [21:00] but then u could have that meme for all software ;) [21:01] cloud-init is especially frustrating [21:01] not so good logging, not so good docs [21:01] * harlowja improvements welcome :) [21:02] dgarstang1, its ubuntu, right? [21:03] smoser: yep [21:03] * dgarstang1 takes a deep breath [21:03] that pastebin is odd. [21:03] cloud-init was being run over and over again [21:04] smoser: maybe cuz it was exiting !0 ? [21:04] This is on GCE... Would using GCE with NoDataSource work or just outright barf? [21:05] GCE, use openstack ;) [21:05] it should work. [21:05] *j/k [21:05] harlowja: que? [21:05] nm [21:05] *squinty eye* [21:05] we have ... contractual obligations. :) [21:06] you installed an ubuntu package ? [21:06] smoser: for cloud-init? Yah... for precise. 0.6.3-0ubuntu1.9 [21:07] smoser: Tried to get the one from debian experimental as it apparetly has gce support, but it didn't want to install on precise [21:09] dgarstang1, is rsyslog installed? [21:11] Yep [21:12] I 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 one [21:13] ok. looking at this paste http://pastebin.com/YReDs9Ps [21:13] you know that for it to find the nocloud datasource, you have to populate /var/lib/cloud, right? [21:15] i think that the behavior you're seeing is what you got on 0.6.3 when there was no datasoruce found. [21:15] there was no 'none' datasource, so the subsequent portions wouldn't end up running. [21:15] one sec [21:15] http://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/files/934/doc/examples/seed [21:15] read that. [21:16] or you may be able to use 'ci-tool' [21:16] http://bazaar.launchpad.net/~smoser/cloud-init/ci-tool/view/head:/ci-tool [21:16] which basically can write a /var/lib/cloud/data/seed dir for you. [21:16] i have to populate /var/lib/cloud ? [21:16] "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:17] smoser: maybe I should try the GCE patch then? [21:17] well, newer cloud-init will probably have dependency issues on 12.04. [21:17] This is it... http://pastebin.com/GjDWFGMj [21:18] no, just drop that file in... [21:18] thats not terribly likely to work/ [21:18] Oh [21:18] if it was written for newer cloud-init [21:18] ok, back to no data source then [21:18] then it wont "just work" on 12.04's version [21:19] probably would'nt be too hard to port it to 0.6.3. [21:19] populate /var/lib/cloud... looking for docs... [21:19] but i pointed at the docs above. [21:19] one sec [21:24] is http://bazaar.launchpad.net/~smoser/cloud-init/ci-tool/view/head:/ci-tool the only way to populate /var/lib/cloud? [21:24] no. you can do it by hand. its very easy. [21:25] doc? :) [21:25] http://cloudinit.readthedocs.org/en/latest/topics/dir_layout.html ? [21:25] http://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/files/934/doc/examples/seed [21:25] oic [21:26] do I need user-data ? [21:27] Actually I have a /var/lib/cloud with stuff in it already http://pastebin.com/BChLFcjt [21:27] sudo 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] bah. the '! [21:27] sudo 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] so, if I have stuff in /var/lib/cloud already, I'd say thats' not the issue? [21:28] no. you aren't finding a datasource. [21:28] because there *is not a datasource* [21:28] and i'm showing you how to make one. [21:30] not following context.... this isnt amazon. There is no user-data or instance-id [21:30] modifying... [21:31] you're giving it one. [21:32] smoser: they don't contextually exist in gce. [21:33] i really don't understand what you're wanting. [21:33] http://pastebin.com/GjDWFGMj [21:33] clearly *does* have a instance-id [21:33] (at least the metadata service has something labeled 'instance-id') [21:33] but thats not even improtant here. [21:33] if you're wanting to run cloud-init, then you need to have it find a datasource [21:34] and you can create a directory in /var/lib/cloud/... that it will see as a datasource [21:34] smoser: Can I just create an empty /var/lib/cloud/nocloud-net? [21:34] there was something there before you put it there? [21:34] you can rm -Rf /var/lib/cloud if you want [21:35] smoser: yes. http://pastebin.com/BChLFcjt [21:35] it will all be put back on boot [21:35] that all was created by cloud-init [21:35] the *seed* is not crated by cloud-init [21:35] it is created by you [21:35] k [21:36] I created /var/lib/cloud/seed/nocloud-net, changed the data source to datasource_list: [ NoCloud ] ... [21:38] added a final_message... rebooted... it's not running it [21:38] Did not find data source. searched classes: ['DataSourceNoCloudNet'] [21:38] I don't know why it even mentions DataSourceNoCloudNet. I certainly didn't specify it [21:40] yay. running [21:56] ok. for what its worth, i just pushed a couple small changes to ci-tool. [21:56] and now: [21:56] sudo ./ci-tool reset --full [21:58] sudo ./ci-tool seed [21:58] will populate the datasource and remove other state that might have been present. [22:08] smoser: 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 script === harlowja is now known as harlowja_away === harlowja_away is now known as harlowja