cdelgehier / ansible-role-XtraDB-Cluster

Other
29 stars 33 forks source link

Fix bootstrapping mysql installation while using non-default datadir #6

Open lorf opened 5 years ago

lorf commented 5 years ago

The problem when using non-default datadir is that wsrep.cnf, containing datadir option, is generated only after bootstrapping mysql installation. So the race occurs on the fresh installations, and we get bootstrapped data in default location and fresh untouched data in the destination path, and the play fails.

To solve this I create zz-host.cnf (should be read after default mysqld.cnf to override values from it), containing non-galera related settings, before bootstrapping database.

Also added new Percona package signing GPG key (https://www.percona.com/blog/2019/02/05/new-percona-package-signing-key-requires-update-on-rhel-and-centos/). It seems to install Percona packages both new and old keys should be present.

journeytosilius commented 4 years ago

Hi @lorf ! Thanks for this patch. I'm getting this error after trying to bring a two node cluster up :

fatal: [172.16.78.91]: FAILED! => {
    "msg": "The conditional check 'xtradb_bind_address == xtradb_master_node' failed. The error was: error while evaluating conditional (xtradb_bind_address == xtradb_master_node): 'dict object' has no attribute 'db'\n\nThe error appears to be in '/home/xavier/Code/proxmox_ansible_dev/proxmox_ansible/config/ansible_resources/roles/ansible-role-XtraDB-Cluster/tasks/bootstrap.yml': line 29, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Start the master node\n  ^ here\n"
}

Do you have any idea why that conditional check can't pass ? Thanks