Failure when deploying on lxd models and model name contains space characters
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
High
|
Mick Gregg |
Bug Description
For instance, on a newly bootstrapped lxd controller:
% juju create-model "foo bar"
created model "foo bar"
% juju switch "foo bar"
local.lxd:foo bar (no change)
% juju deploy wordpress
Added charm "cs:trusty/
Deploying charm "cs:trusty/
But then:
% juju status
...
[Units]
wordpress/0 error lost cannot assign unit "wordpress/0" to machine: cannot assign unit "wordpress/0" to new machine or container: cannot assign unit "wordpress/0" to new machine: Error inserting juju-foo bar into database: UNIQUE constraint failed: profiles.name
...
Moreover, after the above is run, it's also not possible to destroy the controller:
% juju destroy-controller lxd --destroy-
Destroying controller
Waiting for hosted model resources to be reclaimed
Waiting on 2 models, 1 service
Waiting on 1 model, 1 service
Waiting on 1 model, 1 service
Waiting on 1 model, 1 service
Waiting on 1 model, 1 service
... [for ever]
I had to manually lxc delete -f ... and kill the controller.
Note that it could be potentially common for users to create models with such names, as it's very easy for instance when using the Juju GUI.
Changed in juju-core: | |
status: | New → Triaged |
importance: | Undecided → High |
milestone: | none → 2.0.0 |
Changed in juju-core: | |
assignee: | nobody → Horacio Durán (hduran-8) |
status: | Triaged → In Progress |
Changed in juju-core: | |
status: | In Progress → Triaged |
assignee: | Horacio Durán (hduran-8) → nobody |
Changed in juju-core: | |
assignee: | nobody → Reed O'Brien (reedobrien) |
milestone: | 2.0.0 → 2.0-rc1 |
Changed in juju-core: | |
milestone: | 2.0-beta5 → 2.0-rc1 |
Changed in juju-core: | |
milestone: | 2.0-beta6 → 2.0-beta7 |
Changed in juju-core: | |
milestone: | 2.0-beta7 → 2.0-beta8 |
Changed in juju-core: | |
assignee: | Reed O'Brien (reedobrien) → Mick Gregg (macgreagoir) |
Changed in juju-core: | |
status: | Triaged → In Progress |
tags: | added: blocker |
Changed in juju-core: | |
importance: | High → Critical |
Changed in juju-core: | |
importance: | Critical → High |
tags: | removed: blocker |
tags: | added: blocker |
Changed in juju-core: | |
importance: | High → Critical |
Changed in juju-core: | |
importance: | Critical → High |
status: | In Progress → Fix Committed |
tags: | removed: blocker |
Changed in juju-core: | |
status: | Fix Committed → Fix Released |
affects: | juju-core → juju |
Changed in juju: | |
milestone: | 2.0-beta8 → none |
milestone: | none → 2.0-beta8 |
This is surely related on the lxd provider, but also part of a more generic lack of input validation when creating new models.