This one definitely fell into the 'unseen consequences' bucket. The way refresh/upgrade-charm is implemented means that all units do get it essentially simultaneously; thus it would have to be up to charm code to actually stagger restarts.
There are a few approaches that could be used, but the charm *already* has coordinated restarts! The `coordinator` module in charm-helpers was cargo-culted into the charm, and is used to stagger restarts when doing tls certificate changes, etc.
What would be needed is to wire in the restart for the upgrade-charm into that system; e.g. in lines 2025 onwards, in src/lib/charm/openstack/mysql_innodb_cluster.py we have:
ch_core.hookenv.log( "Acquiring config-changed-restart lock for TLS change", "DEBUG") coordinator.acquire('config-changed-restart')
This is the `@when`-ed to enable the restarts of the services to be staggered.
This one definitely fell into the 'unseen consequences' bucket. The way refresh/ upgrade- charm is implemented means that all units do get it essentially simultaneously; thus it would have to be up to charm code to actually stagger restarts.
There are a few approaches that could be used, but the charm *already* has coordinated restarts! The `coordinator` module in charm-helpers was cargo-culted into the charm, and is used to stagger restarts when doing tls certificate changes, etc.
What would be needed is to wire in the restart for the upgrade-charm into that system; e.g. in lines 2025 onwards, in src/lib/ charm/openstack /mysql_ innodb_ cluster. py we have:
This is the `@when`-ed to enable the restarts of the services to be staggered.