What I think happens is that there is a percona-level contention on who's cluster UUID is the right one as we technically ran bootstrap-pxc two times due to a leadership flip to a different unit.
I don't think concurrent bootstrap-pxc is generally a good idea (https://www.percona.com/doc/percona-xtradb-cluster/LATEST/bootstrap.html this doesn't discuss consequential bootstrap-pxc executions on different nodes - I think there is a high chance that the cluster will go crazy like our cluster did).
1.
mysql/2 (the first leader) has set a cluster_state_uuid to b3e1b7e8-c95f-11e7-91fa-56c8581eb616
What I think happens is that there is a percona-level contention on who's cluster UUID is the right one as we technically ran bootstrap-pxc two times due to a leadership flip to a different unit.
I don't think concurrent bootstrap-pxc is generally a good idea (https:/ /www.percona. com/doc/ percona- xtradb- cluster/ LATEST/ bootstrap. html this doesn't discuss consequential bootstrap-pxc executions on different nodes - I think there is a high chance that the cluster will go crazy like our cluster did).
1. c95f-11e7- 91fa-56c8581eb6 16
mysql/2 (the first leader) has set a cluster_state_uuid to b3e1b7e8-
2017-11-14 17:17:43 DEBUG juju-log Bootstrap PXC Succeeded
2.
mysql/1 - the new leader doesn't error out so it must have generated 0dde54c4- c961-11e7- 9775-2f72db67cb da and set is to leader settings.
2017-11-14 17:27:24 DEBUG juju-log Bootstrap PXC Succeeded
3.
mysql/0 - a minion "for life"
Used the correct UUID of the new leader (mysql/1) (0dde54c4- c961-11e7- 9775-2f72db67cb da) at first and even started notifying peer units, so:
somehow got past
if wsrep_ready.lower() in ['on', 'ready']:
cluster_ state_uuid = get_wsrep_ value(' wsrep_cluster_ state_uuid' )
and
elif lead_cluster_ state_uuid != cluster_state_uuid:
and got to
for rid in relation_ ids('cluster' ):
notify_ bootstrapped( cluster_ rid=rid,
cluster_ uuid=cluster_ state_uuid)
2017-11-14 17:31:07 DEBUG juju-log cluster:28: Notifying peers that percona is bootstrapped (uuid=0dde54c4- c961-11e7- 9775-2f72db67cb da)
Notice the time stamp: 17:31:07 - this happened way after mysql/2 set up wsrep_cluster_state to b3e1b7e8- c95f-11e7- 91fa-56c8581eb6 16
4. mysql/0 (minion) started saying that wsrep_cluster_uuid == b3e1b7e8- c95f-11e7- 91fa-56c8581eb6 16
2017-11-14 17:31:57 ERROR juju-log bootstrap uuid differs: 0dde54c4- c961-11e7- 9775-2f72db67cb da != b3e1b7e8- c95f-11e7- 91fa-56c8581eb6 16