charm-mysql-innodb-cluster/src/reactive
Felipe Reyes 83bc7b36ae Delay prom_exporter user creation until password is available.
There are situations where the create_local_prometheus_exporter_user()
handler could be executed in a follower unit before the leader units
gets the chance to generate a password for the prom_exporter user and
store it in the leader databag, this has the consequence that the
prom_exporter user is created with the password 'None' (string
representation of the `None` value), this leads to the problem that the
mysql_exporter daemon can't connect to mysqld.

This patch checks that the password is available, if it isn't, then bail
out and let subsequent executions to re-evaluate this condition.

Closes-Bug: #2033306
Change-Id: I58fc489fd4cc4e06b11c293f63e73bd0ab18897f
2023-08-28 21:12:39 -04:00
..
__init__.py Docstrings and unit tests 2019-10-11 16:10:17 -07:00
mysql_innodb_cluster_handlers.py Merge "Invoke create_databases_and_users on upgrade" 2022-11-14 12:18:10 +00:00
prometheus_mysql_exporter_handlers.py Delay prom_exporter user creation until password is available. 2023-08-28 21:12:39 -04:00