[SRU] Juju api client cannot distinguish between environments
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Critical
|
Julian Edwards | ||
maas (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Saucy |
Fix Released
|
High
|
Unassigned |
Bug Description
In the maas user prefs page it says "You'll need a separate MAAS key for each Juju environment" but this is not of the slightest use since the API for returning owned nodes filters only on the user.
One thing we could do is also take into account the API key used to access the API and only return nodes based on the owner/key combo.
Related bugs:
* bug 1237398: "You'll need a separate MAAS key for each Juju environment" is wrong.
* bug 1081247: maas provider releases all nodes it did not allocate [does not play well with others]
* bug 1229275: juju destroy-environment also destroys nodes that are not controlled by juju
[Impact]
This causes that 2 admin users cannot have their own separate environment, causing them to conflict between environments, and also destroy machines that are not controller by a one environment, but rather, all machines being deployed.
[Test Case]
1. Install maas
2. Create to admin users
3. Try to use both to deploy different juju environments.
[Regression Potential]
Minimal. The provided fix allows multiple juju environments to work, without affecting current single juju environments.
Related branches
- Gavin Panella (community): Approve
-
Diff: 238 lines (+222/-0)2 files modifiedsrc/maasserver/migrations/0058_add_agent_name_to_node.py (+220/-0)
src/maasserver/models/node.py (+2/-0)
- Graham Binns (community): Approve
-
Diff: 84 lines (+48/-1)2 files modifiedsrc/maasserver/api.py (+6/-0)
src/maasserver/tests/test_api_nodes.py (+42/-1)
- Gavin Panella (community): Approve
-
Diff: 137 lines (+52/-8)5 files modifiedsrc/maasserver/api.py (+8/-2)
src/maasserver/models/node.py (+3/-1)
src/maasserver/models/tests/test_node.py (+11/-5)
src/maasserver/tests/test_api_node.py (+9/-0)
src/maasserver/tests/test_api_nodes.py (+21/-0)
description: | updated |
description: | updated |
Changed in maas: | |
status: | Triaged → In Progress |
assignee: | nobody → Julian Edwards (julian-edwards) |
milestone: | none → 13.10 |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas (Ubuntu Saucy): | |
importance: | Undecided → High |
status: | New → Triaged |
summary: |
- Juju api client cannot distinguish between environments + [SRU] Juju api client cannot distinguish between environments |
description: | updated |
Changed in maas: | |
status: | Fix Committed → Fix Released |
tags: |
added: verification-done removed: verification-needed |
Changed in maas (Ubuntu): | |
status: | Triaged → Fix Released |
This is critical, it's hurting a lot of users.