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:
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.
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.