multiple juju environments in maas
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
Raphaël Badin | ||
1.2 |
Fix Released
|
High
|
Raphaël Badin | ||
pyjuju |
Triaged
|
Low
|
Unassigned |
Bug Description
It should be possible to create multiple juju environments in a MAAS. Each user has a different MAAS key, moreover the UI explicitly states that "You'll need a separate MAAS key for each Juju environment.". We found that this is not possible, only one environment is allowed on each MAAS.
To reproduce:
* create two users on MAAS
* create an environment.yml for the first user, execute juju bootstrap
* create an environment.yml for the second user, execute juju bootstrap
* wait for the bootstrap to finish for the first user
* execute juju status for the first environment. You will get an error message like:
$ juju status
2013-02-13 10:58:01,643 INFO Connecting to environment...
2013-02-13 10:58:01,761 ERROR juju environment not found: machines are not running (/MAAS/
After tracking down the problem, I found that juju stores a file in MAAS (provider-state, in /var/lib/
I don't know much about MAAS, but I think this is a MAAS problem, as users should not overwrite other user's files.
Related branches
- Gavin Panella (community): Approve
-
Diff: 53 lines (+30/-2)2 files modifiedsrc/maasserver/api.py (+11/-2)
src/maasserver/tests/test_api.py (+19/-0)
- Gavin Panella (community): Approve
-
Diff: 225 lines (+77/-36)3 files modifiedsrc/maasserver/api.py (+50/-22)
src/maasserver/models/filestorage.py (+9/-0)
src/maasserver/tests/test_api.py (+18/-14)
- Gavin Panella (community): Approve
-
Diff: 462 lines (+200/-61)5 files modifiedsrc/maasserver/api.py (+37/-19)
src/maasserver/models/filestorage.py (+4/-4)
src/maasserver/testing/factory.py (+2/-2)
src/maasserver/tests/test_api.py (+152/-33)
src/maasserver/tests/test_filestorage.py (+5/-3)
- Gavin Panella (community): Approve
-
Diff: 480 lines (+437/-0)4 files modifiedsrc/maasserver/migrations/0048_add_key_to_filestorage.py (+213/-0)
src/maasserver/migrations/0049_filestorage_key_unique.py (+205/-0)
src/maasserver/models/filestorage.py (+9/-0)
src/maasserver/tests/test_filestorage.py (+10/-0)
- Gavin Panella (community): Approve
-
Diff: 261 lines (+228/-2)2 files modifiedsrc/maasserver/migrations/0047_add_owner_to_filestorage.py (+218/-0)
src/maasserver/models/filestorage.py (+10/-2)
- Raphaël Badin (community): Approve
-
Diff: 1323 lines (+971/-80)8 files modifiedsrc/maasserver/api.py (+86/-31)
src/maasserver/migrations/0047_add_owner_to_filestorage.py (+218/-0)
src/maasserver/migrations/0048_add_key_to_filestorage.py (+213/-0)
src/maasserver/migrations/0049_filestorage_key_unique.py (+205/-0)
src/maasserver/models/filestorage.py (+32/-6)
src/maasserver/testing/factory.py (+27/-7)
src/maasserver/tests/test_api.py (+175/-33)
src/maasserver/tests/test_filestorage.py (+15/-3)
- Gavin Panella (community): Approve
-
Diff: 205 lines (+201/-0)1 file modifiedsrc/maasserver/migrations/0050_shared_to_per_tenant_storage.py (+201/-0)
- Gavin Panella (community): Approve
-
Diff: 632 lines (+570/-6)9 files modifiedsrc/maasserver/models/user.py (+1/-0)
src/maasserver/support/pertenant/migration.py (+179/-0)
src/maasserver/support/pertenant/tests/test_migration.py (+384/-0)
src/maasserver/tests/data/test_rsa0.pub (+1/-1)
src/maasserver/tests/data/test_rsa1.pub (+1/-1)
src/maasserver/tests/data/test_rsa2.pub (+1/-1)
src/maasserver/tests/data/test_rsa3.pub (+1/-1)
src/maasserver/tests/data/test_rsa4.pub (+1/-1)
src/maasserver/tests/test_sshkey.py (+1/-1)
- Raphaël Badin (community): Approve
-
Diff: 205 lines (+201/-0)1 file modifiedsrc/maasserver/migrations/0050_shared_to_per_tenant_storage.py (+201/-0)
- Raphaël Badin (community): Approve
-
Diff: 632 lines (+570/-6)9 files modifiedsrc/maasserver/models/user.py (+1/-0)
src/maasserver/support/pertenant/migration.py (+179/-0)
src/maasserver/support/pertenant/tests/test_migration.py (+384/-0)
src/maasserver/tests/data/test_rsa0.pub (+1/-1)
src/maasserver/tests/data/test_rsa1.pub (+1/-1)
src/maasserver/tests/data/test_rsa2.pub (+1/-1)
src/maasserver/tests/data/test_rsa3.pub (+1/-1)
src/maasserver/tests/data/test_rsa4.pub (+1/-1)
src/maasserver/tests/test_sshkey.py (+1/-1)
- Gavin Panella (community): Approve
- Kapil Thangavelu: Pending requested
-
Diff: 460 lines (+265/-72)4 files modifiedMakefile (+27/-17)
README (+1/-1)
juju/providers/maas/files.py (+79/-10)
juju/providers/maas/tests/test_files.py (+158/-44)
- Kapil Thangavelu (community): Needs Fixing
-
Diff: 325 lines (+119/-133)2 files modifiedjuju/providers/maas/files.py (+25/-30)
juju/providers/maas/tests/test_files.py (+94/-103)
Changed in maas: | |
status: | New → Triaged |
importance: | Undecided → High |
Changed in maas: | |
assignee: | nobody → Raphaël Badin (rvb) |
status: | Triaged → Fix Committed |
Changed in maas: | |
status: | Fix Committed → Fix Released |
Changed in juju: | |
importance: | Undecided → Low |
status: | Confirmed → Triaged |
Thanks for reporting this. Oddly enough we had *just* figured out that there might be such a problem in theory, and now we know!
What we had in mind was to split the namespaces between environments, rather than users. After all the usual case will be that one "user" (may be a MAAS-internal actor rather than a human) uploads a file and another downloads it. But it's clearly the same problem.