Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1505)

Issue 20220043: Fix LXC containers on MAAS

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 6 months ago by thumper
Modified:
10 years, 6 months ago
Reviewers:
dimitern, mp+193405, john2
Visibility:
Public.

Description

Fix LXC containers on MAAS We can't get a real CI framework soon enough. When the provisioner was updated to use the API, this accidentally broke LXC on MAAS, as the secret attributes are stripped from the environment config for non-manager nodes. This makes a completely invalid MAAS config, which means the LCX provisioner task never starts. There was no easy fix for this, so the correct one had to do. That is to provide an API call to get what the containers actually need, and not have them depend on things they don't need. I took this opportunity to also simplify the parameters for the StartContainer call. https://code.launchpad.net/~thumper/juju-core/maas-lxc/+merge/193405 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+143 lines, -107 lines) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M container/lxc/lxc.go View 6 chunks +12 lines, -47 lines 0 comments Download
M container/lxc/lxc_test.go View 2 chunks +6 lines, -8 lines 0 comments Download
M environs/cloudinit.go View 2 chunks +20 lines, -12 lines 0 comments Download
M provider/local/environ.go View 1 chunk +7 lines, -9 lines 0 comments Download
M state/api/params/params.go View 1 chunk +8 lines, -0 lines 0 comments Download
M state/api/provisioner/provisioner.go View 1 chunk +14 lines, -0 lines 1 comment Download
M state/api/provisioner/provisioner_test.go View 1 chunk +8 lines, -0 lines 0 comments Download
M state/apiserver/provisioner/provisioner.go View 1 chunk +13 lines, -0 lines 2 comments Download
M state/apiserver/provisioner/provisioner_test.go View 1 chunk +8 lines, -0 lines 0 comments Download
M worker/provisioner/lxc-broker.go View 4 chunks +21 lines, -7 lines 1 comment Download
M worker/provisioner/lxc-broker_test.go View 3 chunks +7 lines, -2 lines 0 comments Download
M worker/provisioner/provisioner.go View 3 chunks +17 lines, -22 lines 0 comments Download

Messages

Total messages: 4
thumper
Please take a look.
10 years, 6 months ago (2013-10-31 11:41:39 UTC) #1
dimitern
Very nice! LGTM https://codereview.appspot.com/20220043/diff/1/state/apiserver/provisioner/provisioner.go File state/apiserver/provisioner/provisioner.go (right): https://codereview.appspot.com/20220043/diff/1/state/apiserver/provisioner/provisioner.go#newcode185 state/apiserver/provisioner/provisioner.go:185: // ContainerConfig returns the current environment's ...
10 years, 6 months ago (2013-10-31 11:50:30 UTC) #2
thumper
And thanks. https://codereview.appspot.com/20220043/diff/1/state/apiserver/provisioner/provisioner.go File state/apiserver/provisioner/provisioner.go (right): https://codereview.appspot.com/20220043/diff/1/state/apiserver/provisioner/provisioner.go#newcode185 state/apiserver/provisioner/provisioner.go:185: // ContainerConfig returns the current environment's configuration. ...
10 years, 6 months ago (2013-10-31 11:55:01 UTC) #3
john2
10 years, 6 months ago (2013-10-31 12:41:34 UTC) #4
LGTM

https://codereview.appspot.com/20220043/diff/1/state/api/provisioner/provisio...
File state/api/provisioner/provisioner.go (right):

https://codereview.appspot.com/20220043/diff/1/state/api/provisioner/provisio...
state/api/provisioner/provisioner.go:161: var result params.ContainerConfig
I would actually think that ContainerConfig would just return the params struct,
rather than splitting it back out into individual args.
That way, if we do decide to add things, we don't have to change the Client API

https://codereview.appspot.com/20220043/diff/1/worker/provisioner/lxc-broker.go
File worker/provisioner/lxc-broker.go (right):

https://codereview.appspot.com/20220043/diff/1/worker/provisioner/lxc-broker....
worker/provisioner/lxc-broker.go:65: providerType, authorizedKeys,
sslVerification, err := broker.api.ContainerConfig()
Just a question, would it make sense to move this API call up a level instead of
here? Most of our API calls occur in the other layer where the watchers are
going on.

Nothing you have to change, just something I thought of.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b