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