unable to determine if a model is a controller model
Bug #1803247 reported by
Jeff Pihach
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
Medium
|
Tim McNamara | ||
2.4 |
Won't Fix
|
Medium
|
Unassigned | ||
2.5 |
Fix Released
|
Medium
|
Tim McNamara |
Bug Description
Because the controller model is "special" the GUI blocks certain actions in it, like the deletion action.
The issue is that we can no longer determine if a model is a controller model as the model-uuid and the controller-uuid no longer match and the name "controller" can be changed.
There doesn't appear to be any information in the ModelInfo call that can be used to determine if a model is a controller model. An 'is-controller' key would be ideal.
tags: | added: papercut ui |
Changed in juju: | |
status: | New → Triaged |
importance: | Undecided → Medium |
Changed in juju: | |
milestone: | none → 2.5-beta2 |
Changed in juju: | |
milestone: | 2.5-beta2 → 2.5.1 |
Changed in juju: | |
milestone: | 2.5.1 → 2.5-rc1 |
assignee: | nobody → Tim McNamara (tim-clicks) |
Changed in juju: | |
status: | Triaged → In Progress |
Changed in juju: | |
milestone: | 2.5-rc1 → 2.5.1 |
Changed in juju: | |
status: | In Progress → Fix Committed |
Changed in juju: | |
milestone: | 2.5.1 → none |
Changed in juju: | |
milestone: | none → 2.6-beta1 |
Changed in juju: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
As a workaround, clients can call juju show-controller to figure this manually by inspecting the "models" section.
Here's an example:
$ juju show-controller
google- australia- southeast1: a9af-411d- 8f0f-21ae59dbe9 f2 uuid: e7986e4d- a9af-411d- 8f0f-21ae59dbe9 f2 machines: 72af-4e94- 8b8c-20b12adfc4 31 72af-4e94- 8b8c-20b12adfc4 31 count: 1 ca32-4a30- 874c-d34e340cc6 f4 ca32-4a30- 874c-d34e340cc6 f4
details:
uuid: e7986e4d-
controller-
[...]
controller-
"0":
instance-id: juju-dfc431-0
models:
controller:
uuid: c8e4b143-
model-uuid: c8e4b143-
machine-
core-count: 4
default:
uuid: c1e8063e-
model-uuid: c1e8063e-
current-model: admin/default
account:
user: admin
access: superuser
Notice that within "models", the model model-uuid is provided. This could potentially be stored early and then compared against the current model that you're interested in.