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

dgarstang1Has scripts been removed from cloud-init ?00:45
harlowjadgarstang1 can u describe that more, not sure how to answer that question :)00:55
=== harlowja is now known as harlowja_away
kwadronautopinions? should i generate a new hostid for popcorn for each virtual machine?08:37
kwadronautpopcon, not popcorn of course.08:38
smoserkwadronaut, that same question came up in another package recently.13:30
smoseri really kind of think you should.13:30
kwadronauti'm thinking i agree. and i wonder if cloud-init should bother. i think it'd be straightforward but unsure if that could be a default debian tpl13:37
kwadronauts/could/should13:37
smoserkwadronaut, maybe cloud-init should just put "intsance-id" into some standard place13:39
smoserand then things like popcon could just say:13:40
smoser[ -f /run/cloud-init/instance-id ] && HOSTID=$(cat /run/cloud-init/instance-id)$(WHATEVER_ELSE)13:41
kwadronautcloud-init isn't the only player. but you're right that it could also be approached from the other side13:42
kwadronautdo you remember the other package with same/similar question?13:44
dgarstang1Has scripts been removed from cloud-init ?16:59
smoserkwadronaut, pollinate was the other thing17:31
smoserdgarstang1, what do yo umean ?17:31
dgarstang1smoser: Lemme find an example. one sec17:33
dgarstang1smoser: http://pastebin.com/Rf6YBu5L ... i just realised what's really going on here is a YAML anchor... but 'scripts' isn't a valid directive for cloud-init, so I assume it just ignores it17:34
dgarstang1and I'm pretty sure I can't put the scripts in one .d file, and the runcmd in another as yaml anchors in python aren't supported across multiple documents17:35
smoserah. 17:37
smoseryeah, thats probalyb correct17:37
dgarstang1oki.17:37
dgarstang1should work if both are in the same file tho? still assuming cloud-init just ignores 'scripts:'... it always did in previous versions. :)17:39
smoserright. it does just ignore that.17:39
dgarstang1it's a lot easier to write it that way than eg: - [ ls, -l, / ]17:39
smoseryep.17:39
smoserdgarstang1, 17:40
smoserhttp://paste.ubuntu.com/6839095/17:40
smoserthat is my default user-data17:40
dgarstang1most of that's gonna go in chef land. :)17:40
smoseryeah, which is perfectly good.17:41
dgarstang1:)17:41
smoseri was just pointing at it as an example of the anchor use17:42
dgarstang1but I assume 'sm_misc:' is the same dealio as 'scripts:' ?17:42
smoseryeah.17:43
smosername it __anchorforyaml if you want17:43
dgarstang1kk17:44
=== harlowja_away is now known as harlowja
dgarstang1ugh. not having much luck with scripts. i can't even tell if it's running. how can I tell?18:59
smoserdgarstang1, version ?19:03
smoserthe yaml thing shoudl work. 19:03
smoserit populates /var/lib/cloud/instance/scripts/19:03
smoserin the 'config' run i think.19:03
smoserand then runs them in the final19:03
dgarstang1smoser: I think the issue is that when a script fails to run, there's totally no idea why, and no output from the script19:05
smoserdgarstang1, it goes to /dev/console on ubuntu19:05
smoserbut you can (and probalby should) change the output of cloud-init via 'output:' config19:06
smoserto go to /var/log/cloud-init-output.log as in my paste above19:06
smoserso that scripts run by it will have stdout and stderr tee'd to that file.19:06
dgarstang1smoser: kk. That'd be useful, thanks19:06
smoser(that is now the default behavior in 0.7.5)19:06
dgarstang1never quite got that to work before. I'll try again19:07
dgarstang1wouldn't output have to go EARLY in the config?19:08
smoserwell, not really.19:08
smoserit reads all config and then acts on it.19:08
dgarstang1oki19:09
dgarstang1tanx19:09
smoserthere are some things that are tricky to get into the config via user-data. (ie, they kind of have to be there alredy)19:15
smosersuch as datasource settings (like what url to look at, or what datasources to search for)19:15
smoserthose are just kinda hard to pass in via a datasource :)19:15
harlowjasmoser back to why need config-drive question19:32
harlowjahttp://bazaar.launchpad.net/~harlowja/cloud-init/ds-openstack/view/head:/cloudinit/sources/helpers/openstack.py#L30219:32
harlowjabasically that code there just switches loading based on finding config drive or reading from metadata19:32
harlowjaso this new DSOpenstack can search for config drive in local mode19:32
harlowjaand also search for metadata service in net mode19:32
harlowjaso thats part of why we could just remove DSConfigDrive19:32
harlowjasince really they are the same data :-P19:33
smoserjust pushed to trunk vendor-data support into nocloud19:33
smoserah. yeah, i see.19:34
smoseri didnt understand your question before.19:34
harlowjanp19:34
smoserit'd be nice to somehow support the explicitly configured DataSourceConfigDrive19:34
harlowjadont run DSOpenstack in net mode :-/19:35
smoserright. but i'm saying upgrade.19:35
smoseror old configs19:35
harlowjaah19:35
harlowjasure19:35
harlowjathere aren't to many unique configs that are special, so it should be possible19:37
smoserharlowja, mainly i was ust saying the list of datasources to search into19:51
smosersomeone would have had 'ConfigDrive'19:52
smoserand your patch woudl then no longer work.19:52
harlowjaright19:53
harlowjanp to solve that19:53

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