ansible-mysql icon indicating copy to clipboard operation
ansible-mysql copied to clipboard

Fix Galera bootstrap issues

Open steventwheeler opened this issue 2 years ago • 4 comments

This fixes a few issues I had when bootstrapping a new Galera cluster.

  1. A race condition exists when managing the users and database on all nodes. This change restricts these actions to the primary node.
  2. I was unable to perform IST without first configuring SST authentication.
  3. MariaDB is not restarted on the second and third nodes after configuring Galera.

steventwheeler avatar May 09 '22 21:05 steventwheeler

I don't understand your PR.

The good way to use this role: launch playbook on first "bootstrap" node and on a second time launch this role on other nodes.

Did you try to launch this role on all nodes at the same time?

HanXHX avatar May 10 '22 14:05 HanXHX

That explains why I struggled getting it up and running. I was running the playbook against all three nodes in my inventory. Is there a reason that two separate runs are preferred?

steventwheeler avatar May 10 '22 15:05 steventwheeler

That explains why I struggled getting it up and running. I was running the playbook against all three nodes in my inventory. Is there a reason that two separate runs are preferred?

This Ansible role is very complicated. If you need 'all at the same time', you must put a shared lock system on the first node and wait the bootstrap before executing other tasks...

I don't know how to perform this lock and keep running on the CI :rofl:

But I can write a better doc on this setup!

HanXHX avatar May 10 '22 16:05 HanXHX

I'm not sure I follow. What do you mean by "shared lock system"? With the changes in this merge request it is able to bootstrap all three nodes in a single run. Also, regarding the CI failure that appears to be a yamllint issue on a line I didn't change.

steventwheeler avatar May 10 '22 16:05 steventwheeler