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

Issue 14696043: Add environment UUID to MAAS provider.

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

Description

Add environment UUID to MAAS provider. We need a way to uniquely identify those machines in MAAS belonging to a Juju environment. Until now Juju's MAAS provider has assumed that all the machines that are allocated, are allocated to the environment that Juju is working with. This is obviously wrong, and can be disastrous. This is the first part of work on the MAAS provider to use a unique identifier for an environment. MAAS will record this identifier (called 'agent_name' in MAAS) and allow its use for filtering. This branch merely adds the UUID to the environment's config. https://code.launchpad.net/~allenap/juju-core/maas-environment-uuid/+merge/191146 (do not edit description out of merge proposal)

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -1 line) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M provider/maas/environprovider.go View 1 chunk +12 lines, -1 line 0 comments Download
M provider/maas/environprovider_test.go View 2 chunks +25 lines, -0 lines 0 comments Download

Messages

Total messages: 5
allenap
Please take a look.
10 years, 6 months ago (2013-10-15 11:00:26 UTC) #1
rvb
On 2013/10/15 11:00:26, allenap wrote: > Please take a look. LGTM (pretty similar to what ...
10 years, 6 months ago (2013-10-15 11:35:00 UTC) #2
rog
LGTM - assuming environment-uuid will be added to configFields and configDefaults in a subsequent MP.
10 years, 6 months ago (2013-10-15 11:41:05 UTC) #3
allenap
On 2013/10/15 11:41:05, rog wrote: > LGTM - assuming environment-uuid will be added to configFields ...
10 years, 6 months ago (2013-10-15 12:27:01 UTC) #4
rog
10 years, 6 months ago (2013-10-15 15:52:18 UTC) #5
On 15 October 2013 13:27,  <gavin.panella@canonical.com> wrote:
> On 2013/10/15 11:41:05, rog wrote:
>>
>> LGTM - assuming environment-uuid will be added to configFields and
>> configDefaults
>> in a subsequent MP.
>
>
> Thanks for pointing that out Roger.
>
> The other fields in MAAS's configFields all have a "maas-" prefix. I'll
> rename this field to have that prefix too, for consistency, and to mark
> it out as a MAAS-specific fix, at least for now.
>
> Thank you both for your reviews!

Might I suggest that if you do that, you change the Prepare
method to return with an error if the maas-uuid (or whatever you
decide to call it) attribute is already set? That way people
can't muck things up by setting a non-unique uuid
in their environments.yaml.

Alternatively you can leave it as environment-uuid and when
we change juju-core to generate it in Prepare for all environments,
we'll reuse that attribute and the maas code can continue to
work without further change (just a bit of code that can be
deleted at leisure).

I think I prefer the latter option, which was what I was thinking
when I LGTM'd.
Sign in to reply to this message.

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