Bind Galera on a hostname for compat with IPv6 addresses
Due to a bug [1] in Galera we can't pass an IPv6 as bind-address, we pass an hostname instead. 1. https://bugzilla.redhat.com/show_bug.cgi?id=1298671 Change-Id: Ia5a5b66dd3e94d3dfb6588550fcfe34382897c27
This commit is contained in:
@@ -83,11 +83,15 @@ if hiera('step') >= 2 {
|
||||
$mysql_config_file = '/etc/my.cnf.d/server.cnf'
|
||||
}
|
||||
# TODO Galara
|
||||
# FIXME: due to https://bugzilla.redhat.com/show_bug.cgi?id=1298671 we
|
||||
# set bind-address to a hostname instead of an ip address; to move Mysql
|
||||
# from internal_api on another network we'll have to customize both
|
||||
# MysqlNetwork and ControllerHostnameResolveNetwork in ServiceNetMap
|
||||
class { '::mysql::server':
|
||||
config_file => $mysql_config_file,
|
||||
override_options => {
|
||||
'mysqld' => {
|
||||
'bind-address' => hiera('mysql_bind_host'),
|
||||
'bind-address' => $::hostname,
|
||||
'max_connections' => hiera('mysql_max_connections'),
|
||||
'open_files_limit' => '-1',
|
||||
},
|
||||
|
||||
@@ -134,6 +134,11 @@ if hiera('step') >= 1 {
|
||||
$galera_nodes = downcase(hiera('galera_node_names', $::hostname))
|
||||
$galera_nodes_count = count(split($galera_nodes, ','))
|
||||
|
||||
# FIXME: due to https://bugzilla.redhat.com/show_bug.cgi?id=1298671 we
|
||||
# set bind-address to a hostname instead of an ip address; to move Mysql
|
||||
# from internal_api on another network we'll have to customize both
|
||||
# MysqlNetwork and ControllerHostnameResolveNetwork in ServiceNetMap
|
||||
$mysql_bind_host = hiera('mysql_bind_host')
|
||||
$mysqld_options = {
|
||||
'mysqld' => {
|
||||
'skip-name-resolve' => '1',
|
||||
@@ -143,7 +148,7 @@ if hiera('step') >= 1 {
|
||||
'innodb_locks_unsafe_for_binlog'=> '1',
|
||||
'query_cache_size' => '0',
|
||||
'query_cache_type' => '0',
|
||||
'bind-address' => hiera('mysql_bind_host'),
|
||||
'bind-address' => $::hostname,
|
||||
'max_connections' => hiera('mysql_max_connections'),
|
||||
'open_files_limit' => '-1',
|
||||
'wsrep_provider' => '/usr/lib64/galera/libgalera_smm.so',
|
||||
@@ -160,6 +165,7 @@ if hiera('step') >= 1 {
|
||||
'wsrep_causal_reads' => '0',
|
||||
'wsrep_notify_cmd' => '',
|
||||
'wsrep_sst_method' => 'rsync',
|
||||
'wsrep_provider_options' => "gmcast.listen_addr=tcp://[${mysql_bind_host}]:4567;",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user