=== marlinc is now known as marlinc|away === marlinc|away is now known as marlinc [08:15] how to use maas with no network | http://askubuntu.com/q/309132 [13:19] roaksoax: 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:24] rvba: hi Raphael! yeah i tested them on hw and it worked just fine. let me investigate. is this latest in saucy? [13:24] roaksoax: the latest package in the daily ppa [13:25] rvba: ok. ill test agaisbt whats in saucy, which include my preseed changes [13:25] rvba: ill let you know how it goes [13:25] roaksoax: ta. We've changed a few other things… but nothing serious, mostly saucy-specific test fixes. [13:25] ok [13:26] yesh cause i have a running cluster here at home and everything was working as expected [13:56] rvba: ok, so preseeds render just fine [13:56] rvba: so it boots into the instance and gets stuck there it seems [13:57] roaksoax: yeah, that's what I saw in the lab, no obvious error but the node seems stuck. [13:57] rvba: so it is either the instances,or maybe even cloud init [13:57] idk [13:57] i'll need to ask scott [13:58] smoser: ping [14:01] rvba: it seems to access the metadata just fine: http://pastebin.ubuntu.com/5774038/ [14:02] Yep, I saw that. [14:07] rvba: cloud-init seems to be failing [14:07] rvba: http://paste.ubuntu.com/5774042/ [14:10] roaksoax: good catch === kentbout is now known as kentb [14:11] rvba: ok I think I know why that is, but I need smoser's input [14:19] rvba: quick thing. Is there a way to tell python to "insert a space in each new line of a string?" [14:21] rvba: got it [14:31] rvba: this would fix it: http://paste.ubuntu.com/5774113/ [14:31] no it won't [14:32] rvba: this would: http://paste.ubuntu.com/5774117/ [14:33] thoughts? [14:36] roaksoax: this would need a serious explanation :) because it's a bit ugly. [14:37] rvba: i know :(. Ok so basically, the enlistment preseed requires 3 spaces before any line of code, while the user_data template doesn't require [14:38] rvba: so when it renders in user_data it is just fine [14:38] rvba: i'll show you in a bit [14:42] rvba: this is the reason: http://pastebin.ubuntu.com/5774132/ [14:45] roaksoax: 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] allenap: ^^ [14:45] :) [14:48] roaksoax: 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] allenap: hi clippy :) [14:49] allenap: so the issue is this for enlistment: http://pastebin.ubuntu.com/5774132/ [14:49] roaksoax: Yeah. The file is YAML, right? [14:49] yeah [14:50] allenap: 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:51] roaksoax: Yeah, that's exceedingly ugly :) I'll try to think of something better. [14:54] allenap: awesome! thanks for looking at it :) [14:55] roaksoax: 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] s/index/indent/ [14:57] rvba: yeah that would be awesome [15:02] Sorry, otp. [15:02] rvba: Yeah, agreed. [15:02] It's still ugly, buy much less so :) [15:02] s/buy/but [15:13] roaksoax, here now [15:16] "cloud-init expects that it has spaces before the start of the line" [15:16] is really "cloud-init reads yaml", yaml format uses indentation. [15:18] you can always just spell it as json if you don't like significant whitespace [15:18] this is true. [15:21] but i don think json soles the problem here. [15:22] mgz: 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] the 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:23] (and best for it to be left unknowledgable actually) [15:24] i think i'm saying the same thing allenap said... [15:24] Yeah, I think we're in agreement here :) [15:26] For _now_, I think adding a tempita tag (really a function) to indent is the best way to approach this. [15:31] roaksoax: I think http://pastebin.ubuntu.com/5774286/ will work. [15:32] allenap: ok cool thanks [15:32] smoser: sorry cleaning lady was clceaning my office [15:35] allenap, yeah, i think i think the same thing. [15:50] rvba: https://code.launchpad.net/~andreserl/maas/enlist_userdata_ipmi/+merge/169836 [16:53] smoser: how does cloud-init loads yaml? [16:53] yaml.load? [16:54] rvba: what would you assert against? [16:54] yaml.safe_load() [16:55] smoser: so I would simply assert that it loads successfully for a test right? [16:57] yeah, i' mguesing it was failing load before (as invalid yaml) [16:58] smoser: yeah, so I'm gonna add a unittest that checks that the rendered preseed can be successfully loaded as yaml [16:58] so i'm wondering what to compare against [17:10] rvba: this seems to work: http://paste.ubuntu.com/5774562/ [17:11] allenap: ^^ === 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