canonical / mysql-k8s-operator

A Charmed Operator for running MySQL on Kubernetes
https://charmhub.io/mysql-k8s
Apache License 2.0
8 stars 15 forks source link

DPE-4200 Scale-up from zero #414

Open paulomach opened 1 month ago

paulomach commented 1 month ago

Issue

O scaling to zero, the last unit ensure the cluster is dissolved. Scale back to unit > 0 don't detect and treat the dissolved cluster.

Solution

Fixes #409

taurus-forever commented 3 weeks ago

BTW, we are adding the test to check scale-down to zero and restore with foreign disk here.

Maybe it worth to copy it into MySQL VM/K8s as well?

paulomach commented 3 weeks ago

we might need to change some things on router to support scaling mysql-k8s to 0 and back up

Testing it, it requires a remove and re-relate. On scaling in to zero, routers are cleaned up from the metadata already. Messaging in the router is very clear, imo I think that's adequate behavior.

taurus-forever commented 3 weeks ago

re: it requires a remove and re-relate

Fields/customers do not like this... can we avoid re-relations without the real over-complication in code?