launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #15142
Re: [Merge] lp:~julian-edwards/maas/ephemeral_proxying_bug-1116331 into lp:maas
On Monday 11 Feb 2013 14:41:19 you wrote:
> Here are my thoughts:
> * 'http_proxy' should be either:
> 1. set to the value the set maas UI (or wherever that is set)
> 2. set to 'http://{{server_host}}:8000'
> 3. set to None
There's a reason that I had not proposed any of this for merging yet - because
this logic is not finished in the code. ;)
> Having preseeds contain the above knowledge is senseless. Put the
> correct value in there.
(As an aside, you're using strong language but failing to justify your
assertion.)
And now, on to the question I asked in the bug:
> * I think its best to basically render multiple 'parts' into a single
> cloud-config. Just have MAAS render the content found in multiple places
> into a multi-part file. it can be MIME multi-part or cloud-config-archive
> format (yaml), they're identical from cloud-init's perspective. [1]
>
> Ie, you have basically 2 parts here:
> 1. cloud-config specifying http proxy
> 2. a user-data-script.
>
> So just have MAAS somewhere have a list of strings that its supposed to send
> down as user-data parts. It will then take that list and render valid
> cloud-config archive with each entry represented. def to_cca(parts):
> data = []
> for item in parts:
> data.append({'content': item})
> return "#cloud-config-archive\n" + yaml.safe_dump(data)
Ok so this is all fine and expected, and (sorta) what I am aiming to do (the
current code was not MPed because it's an unfinished proof-of-concept).
> I'm not really sure of the relationship between 'parts' above and
> 'snippets', but I think they're pretty much the same thing. So, then, maas
> can choose to make 1 of 2 promises to the user about the snippets: a.)
> they'll be consumed by cloud-init as cloud-config parts
> b.) they'll be executed on the commissioning system according to the
> interpreter listed in '#!'
>
> 'a' is more powerful to the end user (they can insert 'boothooks' or any
> other cloud-init part type), but 'b' is less dependent on cloud-init.
'snippets' are not the same thing as such - and I am not sure you understood
why I was asking the original question. The 'snippets" are basically the
"here" documents (included in bash with the << operator) that were embedded in
the original wall-of-bash user data.
We ripped them out of there and used the templating language to include them
later so that a) they can be tested separately at some point, b) they don't
clutter the main user data.
So the problem is that the yaml format screws up here because the snippets are
not indented. However since you pointed out that cloud-init will accept mime
multipart, I can use that instead and it'll all work splendidly.
Thanks for the response.
--
https://code.launchpad.net/~julian-edwards/maas/ephemeral_proxying_bug-1116331/+merge/147668
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~julian-edwards/maas/ephemeral_proxying_bug-1116331 into lp:maas.
References