Comment 4 for bug 1603640

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.