Specialize galera client config

For reliable operation, the mysql client configuration must point to the
local instance, within galera containers. However this prevents the
mysql client from working on other constainers (eg utility).

This patch defaults the mysql connection to the VIP, then overrides that
to 127.0.0.1 for galera containers.

Related: #413
This commit is contained in:
Hugh Saunders 2014-10-28 13:54:25 +00:00
parent a2853e0da4
commit a9a9d04f30
2 changed files with 6 additions and 1 deletions

View File

@ -15,6 +15,11 @@
service_name: mysql service_name: mysql
# Defaults to mysql_address (VIP) when unset.
# Should only be set for the galera group so that they always connect to
# their own instance.
mysql_client_host: 127.0.0.1
container_lvm_fstype: ext4 container_lvm_fstype: ext4
container_lvm_fssize: 5GB container_lvm_fssize: 5GB

View File

@ -1,4 +1,4 @@
[client] [client]
socket=/var/run/mysqld/mysqld.sock host={{ mysql_client_host|default(mysql_address) }}
user=root user=root
password={{ mysql_password }} password={{ mysql_password }}