/srv/irclogs.ubuntu.com/2013/06/17/#maas.txt

=== marlinc is now known as marlinc|away
=== marlinc|away is now known as marlinc
AskUbuntuhow to use maas with no network | http://askubuntu.com/q/30913208:15
rvbaroaksoax: Hi Andres.  The most recent maas package failed to pass our integration tests: the nodes are not enlisting at all.  Did you test your preseed-related changes on a real package or could this change be responsible for the breakage?13:19
roaksoaxrvba: hi Raphael! yeah i tested them on hw and it worked just fine. let me investigate. is this latest in saucy?13:24
rvbaroaksoax: the latest package in the daily ppa13:24
roaksoaxrvba: ok. ill test agaisbt whats in saucy, which include my preseed changes13:25
roaksoaxrvba: ill let you know how it goes13:25
rvbaroaksoax: ta.  We've changed a few other things… but nothing serious, mostly saucy-specific test fixes.13:25
roaksoaxok13:25
roaksoaxyesh cause i have a running cluster here at home and everything was working as expected13:26
roaksoaxrvba: ok, so preseeds render just fine13:56
roaksoaxrvba: so it boots into the instance and gets stuck there it seems13:56
rvbaroaksoax: yeah, that's what I saw in the lab, no obvious error but the node seems stuck.13:57
roaksoaxrvba: so it is either the instances,or maybe even cloud init13:57
roaksoaxidk13:57
roaksoaxi'll need to ask scott13:57
roaksoaxsmoser: ping13:58
roaksoaxrvba: it seems to access the metadata just fine: http://pastebin.ubuntu.com/5774038/14:01
rvbaYep, I saw that.14:02
roaksoaxrvba: cloud-init seems to be failing14:07
roaksoaxrvba: http://paste.ubuntu.com/5774042/14:07
rvbaroaksoax: good catch14:10
=== kentbout is now known as kentb
roaksoaxrvba: ok I think I know why that is, but I need smoser's input14:11
roaksoaxrvba: quick thing. Is there a way to tell python to "insert a space in each new line of a string?"14:19
roaksoaxrvba: got it14:21
roaksoaxrvba: this would fix it: http://paste.ubuntu.com/5774113/14:31
roaksoaxno it won't14:31
roaksoaxrvba: this would: http://paste.ubuntu.com/5774117/14:32
roaksoaxthoughts?14:33
rvbaroaksoax: this would need a serious explanation :) because it's a bit ugly.14:36
roaksoaxrvba: i know :(. Ok so basically, the enlistment preseed requires 3 spaces before any line of code, while the user_data template doesn't require14:37
roaksoaxrvba: so when it renders in user_data it is just fine14:38
roaksoaxrvba: i'll show you in a bit14:38
roaksoaxrvba: this is the reason: http://pastebin.ubuntu.com/5774132/14:42
rvbaroaksoax: the logic that adds indentation would be better placed in the template itself… maybe allenap will have an opinion about this as he is our tempita grand-master :)14:45
roaksoaxallenap: ^^14:45
roaksoax:)14:45
allenaproaksoax: Hi, my name's Clippy. I see you're trying to write a structured configuration file with a free-form template language. Let me help you with that ;)14:48
roaksoaxallenap: hi clippy :)14:48
roaksoaxallenap: so the issue is this for enlistment: http://pastebin.ubuntu.com/5774132/14:49
allenaproaksoax: Yeah. The file is YAML, right?14:49
roaksoaxyeah14:49
roaksoaxallenap: so cloud-init expects that it has spaces before the start of the line. The ugly fix is like: http://paste.ubuntu.com/5774151/14:50
allenaproaksoax: Yeah, that's exceedingly ugly :) I'll try to think of something better.14:51
roaksoaxallenap: awesome! thanks for looking at it :)14:54
rvbaroaksoax: allenap: A less ugly way would be to provide a tempita tag to do the indendation: something like {{maas_ipmi_autodetect_py|index:4}}14:55
rvbas/index/indent/14:55
roaksoaxrvba: yeah that would be awesome14:57
allenapSorry, otp.15:02
allenaprvba: Yeah, agreed.15:02
allenapIt's still ugly, buy much less so :)15:02
allenaps/buy/but15:02
smoserroaksoax, here now15:13
smoser"cloud-init expects that it has spaces before the start of the line"15:16
smoseris really "cloud-init reads yaml", yaml format uses indentation.15:16
mgzyou can always just spell it as json if you don't like significant whitespace15:18
smoserthis is true.15:18
smoserbut i don think json soles the problem here.15:21
allenapmgz: The problem in this example is that it's trying to interpolate one string into the middle of another string. I think a proper solution would be to manipulate the string outside of a template environment that doesn't grok YAML.15:22
smoserthe core issue is that therre are 2 things cooperating on the production of an output (that happens to be yaml formatted). and the first thing is unknowledgable about this.15:22
smoser(and best for it to be left unknowledgable actually)15:23
smoseri think i'm saying the same thing allenap said...15:24
allenapYeah, I think we're in agreement here :)15:24
allenapFor _now_, I think adding a tempita tag (really a function) to indent is the best way to approach this.15:26
allenaproaksoax: I think http://pastebin.ubuntu.com/5774286/ will work.15:31
roaksoaxallenap: ok cool thanks15:32
roaksoaxsmoser: sorry cleaning lady was clceaning my office15:32
smoserallenap, yeah, i think i think the same thing.15:35
roaksoaxrvba: https://code.launchpad.net/~andreserl/maas/enlist_userdata_ipmi/+merge/16983615:50
roaksoaxsmoser: how does cloud-init loads yaml?16:53
roaksoaxyaml.load?16:53
roaksoaxrvba: what would you assert against?16:54
smoseryaml.safe_load()16:54
roaksoaxsmoser: so I would simply assert that it loads successfully for a test right?16:55
smoseryeah, i' mguesing it was failing load before (as invalid yaml)16:57
roaksoaxsmoser: yeah, so I'm gonna add a unittest that checks that the rendered preseed can be successfully loaded as yaml16:58
roaksoaxso i'm wondering what to compare against16:58
roaksoaxrvba: this seems to work: http://paste.ubuntu.com/5774562/17:10
roaksoaxallenap: ^^17:11
=== marlinc is now known as marlinc|away
=== marlinc|away is now known as marlinc
=== marlinc is now known as Marlinc
=== marlinc is now known as marlinc|away
=== marlinc|away is now known as marlinc

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