When a unit is configured for the cluster but not yet joined, the
create_user() function would write to the local database. This would
then break the cluster; instead check for this condition and delay the
user creation until the the unit is clustered.
Reviewed: https:/ /review. opendev. org/c/openstack /charm- mysql-innodb- cluster/ +/879541 /opendev. org/openstack/ charm-mysql- innodb- cluster/ commit/ 2b944827d5d2ac5 cc529a689693aa6 2e1e11d57f
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 2b944827d5d2ac5 cc529a689693aa6 2e1e11d57f
Author: Alex Kavanagh <email address hidden>
Date: Wed Apr 5 11:50:47 2023 +0100
Fix create_user() when unit is out of cluster
When a unit is configured for the cluster but not yet joined, the
create_user() function would write to the local database. This would
then break the cluster; instead check for this condition and delay the
user creation until the the unit is clustered.
Change-Id: I9badf28a22eded e19302ff5115b1d ee16f2b17f7
Closes-Bug: #2015256