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

Issue 14644045: Use environment-uuid when interacting with MAAS

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

Description

Use environment-uuid when interacting with MAAS The environment-uuid is passed - as agent_name - to MAAS when acquiring and listing nodes. This will allow multiple Juju environments to coexist in a single MAAS user's account. In addition, it prevents environment-uuid from being set in environments.yaml, and returns an appropriate error message. This is intended to stop people from inadvertently clobbering existing environments. It also starts cleaning up MAAS's providerSuite by dropping the environ attribute in favour of makeEnviron(). The former was initialised to a half-working environ that caused strange test failures. https://code.launchpad.net/~allenap/juju-core/maas-environment-uuid-use/+merge/191249 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : Use environment-uuid when interacting with MAAS #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+188 lines, -76 lines) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M provider/maas/config.go View 2 chunks +16 lines, -2 lines 1 comment Download
M provider/maas/config_test.go View 2 chunks +17 lines, -3 lines 0 comments Download
M provider/maas/environ.go View 2 chunks +4 lines, -2 lines 2 comments Download
M provider/maas/environ_test.go View 14 chunks +29 lines, -34 lines 0 comments Download
M provider/maas/environprovider.go View 2 chunks +21 lines, -1 line 1 comment Download
M provider/maas/environprovider_test.go View 4 chunks +44 lines, -3 lines 0 comments Download
M provider/maas/instance_test.go View 8 chunks +15 lines, -13 lines 1 comment Download
M provider/maas/maas_test.go View 4 chunks +24 lines, -2 lines 0 comments Download
M provider/maas/storage_test.go View 14 chunks +16 lines, -16 lines 0 comments Download

Messages

Total messages: 3
allenap
Please take a look.
10 years, 6 months ago (2013-10-15 17:00:27 UTC) #1
allenap
Please take a look.
10 years, 6 months ago (2013-10-15 17:03:10 UTC) #2
thumper
10 years, 6 months ago (2013-10-15 21:38:03 UTC) #3
LGTM - with one question and one concern.

What does older MAAS installs do with unexpected GET parameters?  When the new
agent_name field is passed through, is this going to cause problems with older
systems?  Also, I wonder where we should document the required versions.

I foresee a problem when a new juju is running against an older MAAS, the new
agent_name is passed through, and also passed through as a filter when listing. 
Is the unknown field similarly ignored by the filter code?

https://codereview.appspot.com/14644045/diff/4001/provider/maas/config.go
File provider/maas/config.go (right):

https://codereview.appspot.com/14644045/diff/4001/provider/maas/config.go#new...
provider/maas/config.go:23: "environment-uuid": schema.String(),
I do think that we should move this into the general environ config, but this
can happen later.  For expediency, I'm happy to have this just in MAAS for now.

https://codereview.appspot.com/14644045/diff/4001/provider/maas/environ.go
File provider/maas/environ.go (right):

https://codereview.appspot.com/14644045/diff/4001/provider/maas/environ.go#ne...
provider/maas/environ.go:174: acquireParams.Add("agent_name",
environ.ecfg().maasEnvironmentUUID())
Is "agent_name" a new MAAS parameter? The current docs don't list it.

https://codereview.appspot.com/14644045/diff/4001/provider/maas/environ.go#ne...
provider/maas/environ.go:326: filter.Add("agent_name",
environ.ecfg().maasEnvironmentUUID())
Beautiful :-)

https://codereview.appspot.com/14644045/diff/4001/provider/maas/environprovid...
File provider/maas/environprovider.go (right):

https://codereview.appspot.com/14644045/diff/4001/provider/maas/environprovid...
provider/maas/environprovider.go:45: attrs := cfg.UnknownAttrs()
Didn't this bit land as r1984 on lp:juju-core?

https://codereview.appspot.com/14644045/diff/4001/provider/maas/instance_test.go
File provider/maas/instance_test.go (right):

https://codereview.appspot.com/14644045/diff/4001/provider/maas/instance_test...
provider/maas/instance_test.go:39: func (s *instanceTest)
TestStringWithoutHostname(c *gc.C) {
Thank you.  There is a tendency in some juju tests to have too much tested in
one test.
Sign in to reply to this message.

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