Add machine and core count to 'models' output

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

Bug Description

When listing models it would be very useful to see how many machines are in each model, and by extension how many cores. Something like this:

  $ juju models
  MODEL OWNER STATUS MACHINES CORES LAST CONNECTION
  controller admin@local available 1 2 never connected
  default admin@local destroying 6 19 1 minute ago
  k8s* admin@local available 8 48 4 seconds ago

I don't think we need RAM and disk information for the moment.

Tags: usability 2.0
Revision history for this message
Mark Shuttleworth (sabdfl) wrote :

I wonder whether the MACHINES and LAST-CONNECTED coclumns would be useful on 'juju controllers' as well. We certainly would not want to connect to each of the controllers in order to get a current count of machines.

Changed in juju-core:
status: New → Triaged
importance: Undecided → Medium
tags: added: 2.0 usability
Revision history for this message
Richard Harding (rharding) wrote :

+1 to the listing of the number of machines on the models UX. This is something we've always done in the GUI that I've missed myself.

On the controller front, I've thought the same thing, but then the answer is different for each user based on permissions. It's the number of machines on models you have access to and so I worry about different folks having different answers and potential confusion in that. There's also the fear of a performance impact as you'll have to do that ACL resolution and do some match for each controller to get the right answer. I'm inclined to say that the controller one is interesting, but if we do go there, perhaps it's only for admins of the controller where the answer and filtering times aren't required? Or we just try it out on models and see how many folks ask about the controller level in another iteration of Juju.

Changed in juju-core:
milestone: none → 2.0.0
Revision history for this message
Mark Shuttleworth (sabdfl) wrote : Re: [Bug 1602032] Re: Add machine and core count to 'models' output

For a controller, please show the number of models you have access to
and the total machines across all of them.

Mark

affects: juju-core → juju
Changed in juju:
milestone: 2.0.0 → none
milestone: none → 2.0.0
Revision history for this message
Ian Booth (wallyworld) wrote :

With the machine count, we have code to add up machines, but we currently distinguish between machines used to run the controllers and machines used to host workloads. Consider:

controller:
 - HA mode, 3 machines in cluster

controller model:
 - mysql = 2 machines
 - wordpress = 1 machine

default model:
 - mysql = 3 machines
 - mediawiki = 1 machine

Currently, we would report the number of models as 2 and the number of machines as 7 because the 3 machines used to run the controllers themselves are excluded from the count. That seems ok I think?

The interesting bit is if a controller machine has had a unit deployed to the controller model and placed on the controller machine itself using --to. Then we should probably expect the machine count to include that controller machine as well, but it doesn't currently.

As an aside, what we should do for show-controller (the yaml/json output) is add fields to show the HA status of that controller.

Revision history for this message
Mark Shuttleworth (sabdfl) wrote :

On 05/09/16 03:12, Ian Booth wrote:
> Currently, we would report the number of models as 2 and the number of
> machines as 7 because the 3 machines used to run the controllers
> themselves are excluded from the count. That seems ok I think?

No. I specifically want us to start reflecting the juju software in the
status output in the 'controller' model.

That means showing which is the leader unit, showing how many machines
are used, and showing status and messages.

> The interesting bit is if a controller machine has had a unit deployed
> to the controller model and placed on the controller machine itself
> using --to. Then we should probably expect the machine count to include
> that controller machine as well, but it doesn't currently.

Exactly - think about it the way I am guiding you (juju is software that
should show in the model) and that problem disappears.

> As an aside, what we should do for show-controller (the yaml/json
> output) is add fields to show the HA status of that controller.

Agreed.

Mark

Revision history for this message
Anastasia (anastasia-macmood) wrote :

PR for machine and model count in list-controllers: https://github.com/juju/juju/pull/6173

Ian Booth (wallyworld)
Changed in juju:
milestone: 2.0.0 → 2.0-beta18
assignee: nobody → Ian Booth (wallyworld)
status: Triaged → In Progress
Revision history for this message
Ian Booth (wallyworld) wrote :

We now have models and machines in list-controllers

$ juju list-controllers --refresh
CONTROLLER MODEL USER ACCESS CLOUD/REGION MODELS MACHINES VERSION
ian* controller admin@local superuser lxd/localhost 2 4 2.0-beta18.1

In the above case we have bootstrapped and deployed a charm and enabled HA (3 controllers).
So there are 4 machines total plus the 2 initial models.

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.