unable to determine if a model is a controller model

Bug #1803247 reported by Jeff Pihach
6
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: papercut ui
Tim Penhey (thumper)
tags: added: papercut ui
Changed in juju:
status: New → Triaged
importance: Undecided → Medium
Ian Booth (wallyworld)
Changed in juju:
milestone: none → 2.5-beta2
Changed in juju:
milestone: 2.5-beta2 → 2.5.1
Ian Booth (wallyworld)
Changed in juju:
milestone: 2.5.1 → 2.5-rc1
assignee: nobody → Tim McNamara (tim-clicks)
Revision history for this message
Tim McNamara (tim-clicks) wrote :

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:
  details:
    uuid: e7986e4d-a9af-411d-8f0f-21ae59dbe9f2
    controller-uuid: e7986e4d-a9af-411d-8f0f-21ae59dbe9f2
    [...]
  controller-machines:
    "0":
      instance-id: juju-dfc431-0
  models:
    controller:
      uuid: c8e4b143-72af-4e94-8b8c-20b12adfc431
      model-uuid: c8e4b143-72af-4e94-8b8c-20b12adfc431
      machine-count: 1
      core-count: 4
    default:
      uuid: c1e8063e-ca32-4a30-874c-d34e340cc6f4
      model-uuid: c1e8063e-ca32-4a30-874c-d34e340cc6f4
  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.

Revision history for this message
Jeff Pihach (hatch) wrote :

Sorry I wasn't clear in the initial report but we need this exposed via the API for the GUI.

Changed in juju:
status: Triaged → In Progress
Changed in juju:
milestone: 2.5-rc1 → 2.5.1
Revision history for this message
Tim McNamara (tim-clicks) wrote :
Changed in juju:
status: In Progress → Fix Committed
Changed in juju:
milestone: 2.5.1 → none
Revision history for this message
Richard Harding (rharding) wrote :

If the fix is committed we don't remove the milestone. It goes into the list of bugs addressed in that milestone. Was this landed against 2.5? If so it goes on the 2.5.0 milestone.

Changed in juju:
milestone: none → 2.6-beta1
Revision history for this message
Tim McNamara (tim-clicks) wrote :

Thanks for the prod in the right direction Rick. Should be all cleared up now.

Changed in juju:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.