Open carlcsaposs-canonical opened 9 months ago
unit-mysql-router-k8s-1: 21:13:42 ERROR unit.mysql-router-k8s/1.juju-log backend-database:6: This operation (update_relation_data()) can only be performed by the leader unit
Originally posted by @juditnovak in https://github.com/canonical/mysql-router-k8s-operator/issues/152#issuecomment-1787984013
https://warthogs.atlassian.net/browse/DPE-2881
https://github.com/canonical/data-platform-libs/blob/e4bb320b70c60d2cc9b6e6890826f97d151bada3/lib/charms/data_platform_libs/v0/data_interfaces.py#L1917-L1924
Here the lib writes to the app databag without checking if the unit is leader, causing an error log to be written
(The super method checks for leadership, but only returns if not leader)
unit-mysql-router-k8s-1: 21:13:42 ERROR unit.mysql-router-k8s/1.juju-log backend-database:6: This operation (update_relation_data()) can only be performed by the leader unit
Originally posted by @juditnovak in https://github.com/canonical/mysql-router-k8s-operator/issues/152#issuecomment-1787984013