/srv/irclogs.ubuntu.com/2014/02/13/#cloud-init.txt

=== harlowja is now known as harlowja_away
smoserutlemming, https://code.launchpad.net/~utlemming/cloud-init/sdc-op-script/+merge/20606500:52
smoserthe only thing wrong with a boothook is that it doesnt guarantee network.00:52
=== harlowja_away is now known as harlowja
=== pquerna_ is now known as pquerna
=== harlowja_ is now known as harlowja_away
=== shardy_afk is now known as shardy
smoserharlowja_away, one comment on datasource openstack12:01
smosercan't 'wait_for_url' 12:01
smoseri know it sucks12:01
smoserbut you can't12:01
smoseronly ec2 can be annoying12:01
smoserie, we want to be able to have both OpenStack and EC2 enabled12:02
smoserand not block boot for some stupid seconds12:02
smoserharlowja_away, wake up. man.16:15
smoserutlemming, did you see my half written response to the smart os change?16:15
utlemmingsmoser: yeah, and it makes sense16:16
utlemmingsmoser: I'll look at it later16:16
smoserok. i really, really, really want an upload of cloud-init today16:16
smoserthere is a bunch of stuff in16:16
harmwsmoser: will we see an new cirros release this month aswell?17:46
smoser:)17:47
smoseri've been meaning to do that.17:47
smoserpathetically, one of my motivations for doing so is so i can get in a icehouse commit log :)17:47
harmwnice, though how does cirros fit into icehouse commitlogs? ;p17:48
smoserdevstack17:49
smoseri'll change the default cirros used to be the released version.17:49
harmwnice nice17:52
smoserwhat do you use cirros for harmw?17:55
harmwtesting openstack, or something else where I 'just want a vm shell'18:03
harmwinstead of booting fedora/centos 18:03
harmwwhich take considerably longer to boot :)18:05
=== harlowja_away is now known as harlowja_
harlowja_smoser waked up, lol18:17
harlowja_smoser wait_for_url, can be removed :-P18:22
mfischis $INSTANCE_ID only available at bootcmd? It didn't seem to be there at runcmd time18:23
=== shardy is now known as shardy_afk
smoserharlowja_, i just about have it i think. was testing that it actually worked18:43
smoserthen gonna merge it.18:43
smoserhm..18:44
smosermfisch, the doc says it is.18:44
smoseri'm ok to put it in at runcmd also.18:44
harlowja_smoser did u get the overall change, basically unifying cfgdrive and osmetadata datasource, being backed by a common class, and then only really changing in the child classes how the data is fetched and from where (url or disk)18:45
smosermfisch, it does appear that it should be there for you in bootcmd and in boothooks, but it is only done there.18:46
smoserharlowja_, yeah, it looks good.18:46
harlowja_smoser k18:46
harlowja_thx boss18:46
harlowja_:-P18:46
smoserharlowja_, http://paste.ubuntu.com/6927014/18:48
smoserthats my changes so far.18:48
harlowja_smoser seems ok, although should i just remove 'wait_for_url'18:49
harlowja_cause i know we all love waiting for datasources to come online, lol18:50
harlowja_and watchign the log 18:50
smoserharlowja_, well, i had removed wait_for_url18:52
smoserbut then i put it back18:52
harlowja_:-P18:52
smoseri figured its more useful being configurable18:52
harlowja_ah18:52
smoserif you had a openstack where it just wasn't working18:52
smoserie, it didn't come up right way, you could turn max_wait up 18:52
smoserand it would retry18:52
harlowja_ya18:53
harlowja_looks good to me then18:53
harlowja_shall i patch or u?18:53
smosermerged.18:55
harlowja_k18:57
harlowja_i know the heat folks and others wanted , https://code.launchpad.net/~harlowja/cloud-init/ec2-ssl ?18:57
harlowja_although in general since i don't use ssl for this stuff anyway (cfgdrive stil..) up to u :-P18:58
smoserharlowja_, didn't i pull that lareday?18:58
harlowja_oh18:58
harlowja_possibly18:58
harlowja_will double check18:58
smoserif not i will18:59
smoserseems not18:59
smoserharlowja_, there are merge conflicts there19:01
smosercan you resolve those really quick ?19:01
harlowja_k, one sec, writing up little speaker summary/abstract for atalanta summit stuff19:02
smoserooh. fancy.19:03
smoserharlowja_, i'd also like to get the tox stuff too. but can't really pull it if it means it doesn't work "offline" 19:06
harlowja_ya, understandable19:06
smoserharlowja_, random question.19:21
harlowja_yo19:21
smoseri'd like to have cloud-init write some "state" to /run/cloud-init19:22
harlowja_k19:22
smoseri dont have any ideas for a mechanism on doing tha tthat doesn't result in potential race conditions on reading it19:22
smoserie, cloud-init writing the state file while a reader is reading it19:22
smoserdo you?19:22
harlowja_write to temp state file, then swap it?19:23
harlowja_mv is atomic i think in linux19:23
harlowja_who's the readers in this case? users19:23
harlowja_?19:23
smoserreaders is users, yes (or tools)19:36
smosermv is atomic, yes. but if i write state to 'cloud-init.state', then go to update it.19:36
smoserthen that is not atomic.19:36
smosermv cloud-inti.state cloud-init.state.old && mv cloud-init.state.new cloud-init.state 19:37
smoserwould leave a race.19:37
smoserprobably over thinking19:37
smoser:)19:37
med_smoser, how do I ask cloud-init to re-run19:39
smoser:)19:39
mfischmed_ is asking because I want to test a feature w/o rebuilding an image19:40
med_(ie, on an image after I locally hack the cloud-init code019:40
* med_ is mfisch proxy19:40
smoserwhat i do very commonly is19:40
smoserrm -Rf /var/lib/cloud /var/log/cloud-init*19:40
smoserreboot19:40
med_He made me drive him to work and now he asks me to ask questions19:40
med_nod. that's it.19:40
smoseryou can be less invasive too19:40
* med_ knew there was a way19:40
smoserand you can run modules by themselves19:40
smosercloud-init single19:40
mfischsmoser: I'm toying with the idea of having access to INSTANCE_ID inside the landscape module19:41
mfischalthough I wonder if landscape uses hostname by default, /me checks19:41
med_mfisch, sounds like you're still working for (C)19:41
med_j/k19:41
smosermfisch, so 2 things there..19:44
smosera.) i'm not opposed to having INSTANCE_ID just in the environment whenever we set it19:44
smoserb.) you do have access to the instance id in the landscape module19:44
mfischb) not currently19:44
mfischand its not a shell script like bootcmd is19:45
mfischso I'd have to do a pass of the dictionary we're building19:45
smoseryou do have access.19:45
smoseryou get 'cloud' passed in19:45
smoserthat has it.19:45
mfischah cool19:46
mfischwould a simple check like if the dict has a key of $INSTANCE_ID set it there work?19:46
mfischmay want to make that more generic19:47
smosermfisch, ?19:49
smoserthe 'cloud' object has 'get_instance_id()'19:49
smoserand it proxies most things through to cloud.datasource.19:50
mfischsmoser: I mean in the config file, we need a token that says "substitute this with the instance ID"19:50
smoseri'm confused now.19:51
mfischsmoser: the landscape stuff gets loaded as a dictionary in that file19:53
mfischaccount: foo19:54
mfischfor example19:54
mfischcomputer-title could default to instance id if unset19:54
mfischor something like if dict[computer-title] == "$INSTANCE_ID" then do the substitution19:55
mfischsmoser: let me propose a fix and maybe it makes more sense19:55
smoserhttp://paste.ubuntu.com/6927388/ ?19:57
mfischsmoser: yes, exactly19:57
smoserthat doesn't do any template/rendering, but functional19:57
mfischsmoser: I will test that19:58
mfischsmoser: it screwed up the ordering in the config file to change it there, I'll look into it 20:07
mfischalso instance human readable name, whatever that is would work better there20:08
smosermfisch, yeah, yaml wont write in any predictable order20:15
mfischsmoser: it's sticking it above [client] which confused landscape20:18
smoseroh?20:18
mfischyeah it comes out as20:18
mfischcomputer-title = foo20:18
mfisch[client]20:18
mfisch...20:18
smoseroh. yeah, it would20:18
smoser:)20:18
smosercause i put it there.20:18
smoseri didn't realize that. 20:18
smoserjust put it in the right place.20:18
smosermfisch, http://paste.ubuntu.com/6927527/20:20
mfischsmoser: I20:21
mfischsmoser: I just moved it up and checked if it was in ls_cloudcfg20:21
mfischabove the merge20:21
smoserewll that paste there should basically fill it into instance id if its not present.20:22
mfischsmoser: yep and that explains why my idea didnt work20:27
mfischsmoser: sorry for the delay, this is what I ended up doing based on the 12.04 version:20:48
mfischhttp://paste.ubuntu.com/6927655/20:48
smosermfisch, well, if you do it after the mergeTogether20:58
smoserthen you ensure that you're lowest priority20:58
smoserie, merge all the stuff the way it does20:58
smoserthen only fill it if its not set elsewhere20:58
zoozhi smoser, It's Vaidas. We've been talking over email re GCE data source20:59
mfischsmoser: true21:00
smoserzooz, hey.21:04
smosertrunk has gce now. woohoo.21:04
smoser(possibly not working as i might have broke your code :)21:05
zoozcool, I am about to look at your improvements and add them to my changes21:05
zoozI have got proper tests now, handling of user-data and more21:05
zoozsmoser, no worries, I will test in GCE before I do a pull request21:05
zoozin fact I have been using cloud-init in GCE without any issues for some time now21:07
zoozsmoser, a merge request is on the way for your review. I have tested it in GCE and ran unit tests. No issues.21:20
smoserzooz, thank you.21:22
smoseri plan on a cloud-init upload to ubuntu tonight.21:22
zoozgreat21:23
smoserso this will make its way into cloud images for trusty tonight21:23
zoozawesome!21:23
zoozdone21:28
zoozlet me know if any issues21:28
med_thanks smoser.21:42
med_does cloud-init get SRUd (or have a MRE for prior releases)?21:43
smoserwell, SRU.21:43
smoserbut for "hardware" enablement, sru team has let things in.21:44
med_nodz.21:44
smoserit is honestly though, somewhat of apain to port back to 12.04 at this point. although datasources are fairly standalone.21:44
med_'k21:44
* med_ will just take a look at rmadison in the morning21:44
smoserzooz, still there?21:52
zoozsmoser, yeah21:52
smoseris there  a reason you'd not want the dns resolution?21:52
smoserthe way i did it it actually works (should work) in gce21:52
smoserand will fail quickliy (dns resolution) just about anywhere else21:52
zoozsmoser, no particular reason, I can test it using dns name21:53
smoserwithout attempting to get access to a 169.254.169.254 that might be firewalled off (and socket level timeout)21:53
zoozgood point21:53
zoozlet me do a quick test21:53
zoozsmoser, it does work in GCE using dns name21:54
smoserok. so lets keep that part, that will save people elsewhere from doing a request to that url.21:55
smoser(unless there is a dns entry external there, which would be unlikely)21:55
zoozsmoser, do you want me to quickly add it back?21:56
smosersure.21:56
smoseri have to go now for a couple hours.21:56
smoserso i'll take a look again later.21:56
zoozthanks21:57
harlowja_smoser alrihgt, i got some free time23:27

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