canonical / maas-anvil

A snap for managing charmed MAAS deployments.
https://maas.io
Apache License 2.0
3 stars 7 forks source link

feat: scale Juju controllers according to anvil cluster size #30

Open wyattrees opened 4 months ago

wyattrees commented 4 months ago

Add controllers to machines missing them once the cluster size is at least 3, increasing the number of controllers for every odd machine added

SK1Y101 commented 4 months ago

Should we add information in the README the explains that juju controllers will grow with the cluster, rather than leaving it transparent to the user?

wyattrees commented 4 months ago

I just finished another round of review. Apart from the comments, I think that we should also add a scale down process. That can be handled on the same step with extra logic or the already implemented step should be renamed to something like ScaleUpJujuStep and a second one should be introduced: ScaleDownJujuStep. The scale down will just be remove-unit controller/<unit> and has to run when nodes are removed from the anvil cluster.

juju remove-unit controller/<unit> is not supported--it errors with "ERROR removing unit controller/2 failed: removing units from the controller application not supported." AFAIK you can only remove controller machines, which would also force us to remove the other applications on those machines

skatsaounis commented 4 months ago

This is blocked by: https://bugs.launchpad.net/juju/+bug/2073986