/srv/irclogs.ubuntu.com/2014/09/10/#cloud-init.txt

ndonegan_harlowja: Is Heat making use of cloud-init? Haven't looked into Heat all that much yet00:11
harlowjandonegan_ seems like a very heavy user00:11
harlowjahttps://github.com/openstack/heat-templates/blob/master/hot/software-config/example-templates/example-cloud-init.yaml00:16
harlowjaand others...00:16
harlowjamost of that template is just formed into cloudinit blobs, lol00:16
harlowjaeven the crappy merging format00:16
harlowjahttps://github.com/openstack/heat-templates/blob/master/hot/software-config/example-templates/example-cloud-init.yaml#L4000:16
smoserharlowja, oh. wow. someone using the crappy merging format.01:15
smoserthats neat i ithink :)01:15
harlowjasmoser its something, hahah01:15
harlowja*scary*01:15
harlowjalol01:15
smoserwell, to be fair, anyone using anything that i wrote is scary01:16
harlowja;)01:16
harlowja+301:16
harlowjahaha01:16
smoserand then, when you throw in that josh harlow contributed01:16
harlowja+1001:16
harlowjalol01:16
smoserit just gets down right horrific01:16
smoser:)01:16
harlowjadef01:16
smoserhave a nice night man. and thanks for all your help always.01:17
harlowjanp01:18
=== harlowja is now known as harlowja_away
=== praneshp_ is now known as praneshp
harmwso, people are actually *using* cloud-init! 07:16
harmwwoohoo :p07:16
harmwsmoser: thanks!14:24
harmwreading the cirros announcement14:24
smosersince i suck in being responsive and in so many other ways, the least i can do is publicly thank you14:25
harmwlol14:25
harmwwell, thanks :)14:26
harmwlooks nice :p14:26
harmwbtw, when is a new version of c-i due?14:27
=== zz_gondoi is now known as gondoi
smoserharmw, a few things hav eto be fixed.15:36
smoseropenstack things15:36
smoservendor-data15:36
smoserand logg woarn. that is currently there.15:36
smosergoing to look more of that today15:36
JayFsmoser: Is there any vendor_data handling in any of the current data sources?15:58
JayFsmoser: hmm... I think I may have thought what I had to do for the first step was harder than I thought16:01
hobanHello everyone16:16
smoserJayF, i'm gonna look at that now.16:18
JayFI'm working on it as we speak16:19
hobanI'm working towards migrating from CentOS 6.x to 7.0. Previously, we've done post-installation scripting via /etc/rc.d/init.d/firstboot, which no longer exists. I presume I could use /etc/rc.local. but I only want this code to run on the first time the system boots. Would cloud-init be a good fit for this? I also see a fairly immediate need to use something similar for OpenStack instances we'll be exploring soon. Any reason cloud-init couldn't handle my nee16:19
hobanMainly, I'm just manually applying some puppet manifests & running some scripts.16:19
JayFsmoser: what keeps things from blwoing up if vendor_data.json isn't actually json?16:21
JayFsmoser: that's what I've been trying to figure out w/r/t https://etherpad.openstack.org/p/cloud-init-vendor-data16:21
JayFit looks like the current parsing would raise an exception if anyone put anything but JSON in that file anyway16:21
smoser"vendor_data.json must be valid json, or cloud-init will warn and ignore"16:22
JayFOH16:22
JayFso that behavior is based on what's under the 'cloud-init' key16:22
JayFso if I have DataSourceConfigDrive loading in vd similarly to how the other sources do it, that should be one chunk of work that can merge separately16:22
smoserok.16:23
smoserso that pad is what i thikn it should work like16:23
smosernot what it does (we're both aware its buggy)16:23
JayFYeah, I'm trying to break work up into steps16:23
smoserbut basically, if 'json.loads(open("vendor-data.json"))' returns a 16:23
smoser string: then cloud_init_vendor_data = vendor_data16:24
JayFhttps://code.launchpad.net/~jason-oldos/cloud-init/upgrade-configdrive/+merge/232312 that should get us to the point of ConfigDrive feeding in vd the same as the OpenStack data source (md service) does16:24
smoser   (ie, this is  all for me)16:24
JayFgotcha16:24
smoseryou said that ruby would have a hard time getting a string, but python-json does allow that16:24
smoserbut it'd be odd16:24
JayFIf I were to do it in python, I'd almost certainly just do a try: except:16:24
smoserthen if its a list... we assume its clond-config-archive, and inspect each of the elements of the list.16:24
JayFbceause afiact json.loads() in python throws a valueerror if it's not valid json16:25
smoserright16:25
smoserit will.16:25
smoseri showed you this before16:25
smoserhere... just aminute16:25
JayFyeah I remember :)16:25
smoser$ python -c 'import json; print(json.dumps(""))'16:25
smoser""16:25
smoserer.. maybe better.16:25
smoser$ python -c 'import json; print(json.dumps("this is just a string"))'16:26
smoser"this is just a string"16:26
JayFWhat in the blue hell did I do earlier to make it throw an exception?!16:26
smoser$ python -c 'import json; print(json.loads(json.dumps("this is just a string")))'16:26
smoserthis is just a string16:26
smoser$ python -c 'import json; json.loads("this is just a string")'16:27
JayFhttps://gist.github.com/jayofdoom/efd85d68df5bc9c7421716:27
smoser^^ that will show value error16:27
JayFsmoser: ^16:27
smoserbut16:27
JayFOH16:27
JayFdumps vs loads16:27
JayFthat's the piece I was missing16:27
smoser$ python -c 'import json; json.loads("\"this is just a string\"")'16:27
smosera quoted string is valid json16:27
smosera non-quoted string is not.16:28
JayFaha16:28
JayFThat makes a lot of sense, thank you very much for walking me through it16:28
smoser:)16:28
JayFOK16:29
JayFso assuming my existing patch is fine16:29
JayFWhat's the next step for getting the network configuration support in16:29
JayFam I dependant on the overall vd fixes?16:29
smoserok. give me a bit . and i'll look at this more. have to finish something up.16:34
JayFOK, that works. I need to commute into the office anyway. When you look at it comments on the merge req would be awesome too :)16:35
JayFty16:35
=== harlowja_away is now known as harlowja
smoserharmw, 18:28
smosercloudinit/distros/freebsd.py:267: undefined name 'searchservers'18:28
harmweerrrrr18:29
harmwhow come 18:29
smoseri'm virtually certain it should be searchdomains18:31
harmwsounds familiar, since it should probably should be searchdomains18:31
harmwyep18:31
smoseras searchdomains is assigned to []18:31
harmwindeed18:31
smoserand never set otherwise18:31
smoserk.18:31
smoseri'll make that change18:31
harmwthis does ring a bell though, I'm sure i've fixed that once already18:32
harmwperhaps never got merge, or I'm just way off :p18:32
harmwthanks though smoser 18:32
smoserwell, trunk is up to date wrt to lp:~harmw/cloud-init/freebsd-fixes18:33
smoserbut who cares. fixed.18:34
harmwI haven't seen it recently, so probably never got merged somewhere in the past few months - if I'm even correct18:35
harmwwhich ubuntu version should I use to build cirros btw?18:36
harmw12.04 or somthing?18:36
harmwndonegan_: jenkins and jclouds plugin, is that fun?18:45
harmwfrom the looks of it that'll spawn a new vm on any supported cloud to just complete the buildtask18:46
smoserharmw, 0.3 will only build on 12.0418:50
smoserthere is a buildroot bug that causes that.18:50
harmwgreat thanks18:50
smoseri will plan to build 0.4 on trusty though18:52
smoserso as soon as we get a up to date buildroot we can move there.18:52
harmwcool18:52
smoserJayF, where is your work for vendor data stuff ?18:55
JayFsmoser: um I linked it earlier18:55
JayFhttps://code.launchpad.net/~jason-oldos/cloud-init/upgrade-configdrive/+merge/23231218:55
JayFlike I said it's not a lot, because I don't think a lot was needed to get to the point where DataSourceConfigDrive does the same stuff for vd that DataSourceOpenStack does18:56
smoserok. will look.18:57
smoserJayF, the one issue there 19:07
smoserhm.. maybe not.19:07
smosernever mind. 19:07
smoserJayF, i like how you did the search.19:10
smoserwe should go backwards on OS_VERSIONS until we find on.19:10
smoseri think "chronological order by time" is redundant :)19:12
=== mgagne is now known as Guest75250
JayFsmoser: I write comments in JayF -vvvvvv19:26
JayFheh19:26
JayFsmoser: you want me to reword that or any other comments?19:26
smoserno. i 'm llooking 19:27
smoserand i think i can simplify it a bit19:27
smoserJayF, http://paste.ubuntu.com/8312141/19:33
smoserthat is diff versus trunk at 100919:33
JayFWhen you said you could simplify, I suspected that'd be what you'd do19:34
JayFit lgtm19:34
smoserit makes the BaseReader just select the latest supported version19:34
smoserok. can you give it a quick test ? i will too.19:34
smoserthe other test i have to do is test ec2 right nwo19:34
smoserand make sure we didn't break it or make annoying warnings if openstack looks like ec2 and that ds claims it19:35
JayFI don't have a great test environment for this right now19:35
JayFdo you have a suggestion?19:35
JayFWe tested our local changes by using cloud-init to install a newer cloud-init rpm/deb via user_data then rebooting to see if it worked right, heh19:36
JayFbut I obviously can't do that until my changes get far enough that trunk will work on my servers19:36
smoserah. ok. i was just going to build from trunk19:37
smoserand boot an instanance19:38
smoserthen install that19:38
smoserand run cloud-init --local an dcloud-init19:38
smoserand see that it seemed to have made sense.19:38
JayFsmoser: boot and instance where? for ec2 obviously aws, but what cloud uses ConfigDrive all the way around except OnMetal?19:39
smoserupdated http://paste.ubuntu.com/8312203/19:40
smoserJayF, well, if you boot with --configdrive=119:41
smoserthen you will get a config drive19:41
smoseryou'll still have the metadata service, but cloud-init should choose the configdrive19:41
JayFsmoser: I think harlowja and I both wanted to get the version= kwarg out of the function signature for read_config_drive() since it's not used19:42
JayFsmoser: you didn't appear to keep that change in your diff?19:42
smoserwell, i kept it.19:43
smoserso you could explicitly state "i want this one"19:43
JayFnowhere in existing code is that used at all though19:43
smoserright.19:43
smoserok. lets drop that then19:43
JayFcool19:45
smoseri do think theres good reason to have it19:45
JayFI can absolutely see situations where it /could/ be valuable19:45
smoseri'd like to be able to configure it in the dsconfig19:45
smoseryeah.19:46
JayFbut I was always told to not include args for stuff like that until it's used19:46
smoser:)19:46
JayFbut I don't know or have strong opinions in this case19:46
JayFalthough being able to tell cloud-init which configdrive version to read via config could be interesting19:46
smoserbiggest use case would be able to reproduce a bug on OS_HAVANA cloud19:47
smoserwhen all i had access to was an OS_JUNO19:47
smoseror something19:47
JayFI don't /think/ ConfigDrive is version bumping in Juno?19:47
JayFis it?19:47
smoserjust a bad example19:53
JayFI mean, it's OK if it's a bad example, just wanted to make sure I was up on what was actually happening :)19:55
JayFalthough there will certainly be one for KILO19:55
smoserJayF, so it looks good to me so far.20:14
JayFIs there any reason not to land the changes with your modifications?20:15
smoserthe thing annoying right now is that 20:15
smoseron amazon:20:15
JayFLand those then we can talk about next steps?20:15
smoser2014-09-10 20:10:30,588 - DataSourceOpenStack.py[DEBUG]: Giving up on OpenStack md from ['http://169.254.169.254/openstack/2012-08-10/meta_data.json', 'http://169.254.169.254/openstack/2013-04-04/meta_data.json', 'http://169.254.169.254/openstack/2013-10-17/meta_data.json', 'http://169.254.169.254/openstack/latest/meta_data.json'] after 0 seconds20:15
smoseri just landed. 20:15
JayFWoo20:15
JayFI don't think it's that bad20:15
JayFthat's one log line, in debug20:15
JayFmost normal people won't run in debug ... 20:15
smoserwell, it annoying that it does 4 GETs though.20:15
JayF... we do20:15
JayFAh, I see that20:15
JayFalso ssomething kinda strange20:15
smoserwe could have it just first poke '/latest/meta_data.json' or even just '/latest/'20:16
JayFis you're either logging in reverse20:16
smoserand assume that would always b there.20:16
JayFor going through them in reverse20:16
smoserthat was just from the initial search20:16
smoserafter it finds one20:16
smoserthen it goes in reversed order like you did20:16
smoserits just looking for presense of a MD server at all20:16
JayFHmm20:16
JayFsmoser: if a cloud is running md service20:16
JayFsmoser: does a GET on /openstack/ succeed?20:17
JayFIf so that's a real quick short circuit for that data source20:17
smoserright20:17
smoseri'm gonna change that now to just check for /opentsack/20:19
JayFSweet20:23
smoserwe've made some good progress today.20:47
=== jfontan_ is now known as jfontan
=== gondoi is now known as zz_gondoi
JayFsmoser: I'd still like to chat at some point about what the best next step is for me to get the bigger pieces I want to merge in22:54
JayFsmoser: also, RFE (and something I might try and implement if it's easy), an option to point cloud-init at a config drive dir22:55
JayFsmoser: for running it against "fake" config drives in a chroot22:55
JayFsmoser: CoreOS's cloud-init thinger does this, and it's been very useful in troubleshooting22:56
smoserJayF, you can do that.23:41
smoseralmost certain it takes a 'seed' dir.23:41
JayFah, nice. I'll look at that, if so that'll help testing23:42
smoseryeah, it works.23:43
smoseror should23:43
smosersee DataSourceConfigDrive23:43
smoser        if os.path.isdir(self.seed_dir):23:43

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