Show controller version in 'juju controllers'

Bug #1603640 reported by Mark Shuttleworth
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Ian Booth

Bug Description

It would be useful to see the version of the controller software in 'juju controllers', please add that at the end (after cloud/region).

Tags: usability 2.0
Changed in juju-core:
status: New → Triaged
importance: Undecided → High
tags: added: usability
tags: added: 2.0
Changed in juju-core:
milestone: none → 2.0-beta13
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: 2.0-beta13 → 2.0-beta14
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: 2.0-beta14 → 2.0-beta15
Changed in juju-core:
milestone: 2.0-beta15 → 2.0-beta16
Changed in juju-core:
milestone: 2.0-beta16 → 2.0-beta17
affects: juju-core → juju
Changed in juju:
milestone: 2.0-beta17 → none
milestone: none → 2.0-beta17
Changed in juju:
assignee: nobody → Reed O'Brien (reedobrien)
Changed in juju:
status: Triaged → In Progress
Changed in juju:
status: In Progress → Fix Committed
Revision history for this message
Ian Booth (wallyworld) wrote :

We want to keep "juju controllers" as a command that always succeeds, and returns instantly. It does this by *only* parsing and printing just the local controllers.yaml file and not making any API calls. This is to avoid the situation where a bad or stuck controller can prevent the user from seeing what controllers they have.

A tabular output option was added to juju show-controller. API calls are made to display the level of access the current user has to that controller, as well as the agent version.

$ juju show-controller --format tabular
CONTROLLER MODEL USER ACCESS CLOUD/REGION VERSION
prod admin@local/controller admin@local superuser lxd/localhost 2.0-beta17.1

show-controller also allows multiple controllers to be specified:

$ juju show-controller --format tabular prod test

We can discuss and tweak the decisions made, and the reasoning for them, if the approach taken is not desirable.

Revision history for this message
Mark Shuttleworth (sabdfl) wrote : Re: [Bug 1603640] Re: Show controller version in 'juju controllers'

Yes, we want the command to be FAST and that means it has to use cached
output.

But no, it is NOT a good decision to have a parameter like '--format
tabular' change the behaviour of the command - it is explicitly a
parameter about FORMAT not about SCOPE, and a change of behaviour that
crosses those lines is bad UX.

In this case, please *cache* the information desired in the normal
output (version etc) in controllers.yaml. It might be out of date, but a
--refresh option might be used to expand SCOPE to get fresher versions etc.

Mark

Curtis Hovey (sinzui)
Changed in juju:
status: Fix Committed → Fix Released
Revision history for this message
Mark Shuttleworth (sabdfl) wrote :

No, this is not fixed if it has been done as Ian suggested.

Ian Booth (wallyworld)
Changed in juju:
assignee: Reed O'Brien (reedobrien) → Ian Booth (wallyworld)
status: Fix Released → In Progress
Revision history for this message
Ian Booth (wallyworld) wrote :

I'll explain what's been done; I think it was unclear. The original work enhanced "juju show-controller" to include the extra agent version and user access information. "juju list-controller" was not changed. Because "juju show-controller" lacked a tabular output option, that was added, but the default remains yaml for show-controller as it is for other juju show commands.

Today I have done additional work to enhance list-controllers command. It still only looks at the local yaml files (for performance) to get the data, but there's now infrastructure to ensure this is able to be kept up to date. The agent version and user access is initially set at bootstrap.

$
$ juju bootstrap ian aws
$ juju list-controllers
CONTROLLER MODEL USER ACCESS CLOUD/REGION VERSION
ian* default admin@local superuser+ aws/us-east-1 2.0-beta18.1+

+ these are the last known values, run with --refresh to see the latest information.
$
$

The information is cached. Run *any* juju command like status or whatever also has the side effect of updating the information. Plus, you can also use the refresh option:

$
$ juju list-controllers --refresh
CONTROLLER MODEL USER ACCESS CLOUD/REGION VERSION
ian* default admin@local superuser+ aws/us-east-1 2.0-beta19.1+
$
$

So now both juju list- and show- controller(s) provide the required information. And the list- variant remains a command that runs locally by default, so that a stuck controller doesn't affect its use.

This work will land for beta18 next week.

Ian Booth (wallyworld)
Changed in juju:
milestone: 2.0-beta17 → 2.0-beta18
Revision history for this message
Mark Shuttleworth (sabdfl) wrote :

Thank Ian, this looks tasteful. I think we can drop the tabular output
from show-controller since it's essentially incomplete (doesn't show
keys etc). So show-controller would be rich and yaml-only,
list-controllers is tabular by default and includes this cached info.

Mark

Ian Booth (wallyworld)
Changed in juju:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
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.