Ensure /etc/mysql/my.cnf removal
Additional fix to conflicting mysql config files in order to fix mysql syslog logging in Ubuntu. For simple deployment (custom_setup_class undef): * /etc/mysql/my.conf should be used in Ubuntu For HA case for Centos/Ubuntu: * /etc/mysql/my.conf should be absent * /etc/my.cnf should be used (Note that changes are Fuel OSCI packaging specific) Closes-bug: #1349601 Change-Id: I56c1b5ebca2553d341fe0498451075294f3e651f Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
This commit is contained in:
@@ -40,16 +40,24 @@ class mysql::server (
|
||||
$use_syslog = true,
|
||||
) inherits mysql::params {
|
||||
|
||||
if ($config_hash['config_file']) {
|
||||
$config_file_real = $config_hash['config_file']
|
||||
} else {
|
||||
$config_file_real = $mysql::params::config_file
|
||||
}
|
||||
|
||||
class { 'mysql::password' :
|
||||
root_password => $root_password,
|
||||
old_root_password => $old_root_password,
|
||||
etc_root_password => $etc_root_password,
|
||||
config_file => $config_file_real,
|
||||
}
|
||||
|
||||
class { 'mysql::config' :
|
||||
bind_address => $bind_address,
|
||||
use_syslog => $use_syslog,
|
||||
custom_setup_class => $custom_setup_class,
|
||||
config_file => $config_file_real,
|
||||
}
|
||||
|
||||
Exec {path => '/usr/bin:/bin:/usr/sbin:/sbin'}
|
||||
|
||||
@@ -76,22 +76,32 @@ class openstack::db::mysql (
|
||||
$use_syslog = false,
|
||||
) {
|
||||
|
||||
if $custom_setup_class {
|
||||
file { '/etc/mysql/my.cnf':
|
||||
ensure => absent,
|
||||
require => Class['mysql::server']
|
||||
}
|
||||
$config_hash_real = {
|
||||
'config_file' => '/etc/my.cnf'
|
||||
}
|
||||
} else {
|
||||
$config_hash_real = {}
|
||||
}
|
||||
|
||||
class { "mysql::server" :
|
||||
bind_address => '0.0.0.0',
|
||||
etc_root_password => true,
|
||||
root_password => $mysql_root_password,
|
||||
old_root_password => '',
|
||||
galera_cluster_name => $galera_cluster_name,
|
||||
galera_cluster_name => $galera_cluster_name,
|
||||
primary_controller => $primary_controller,
|
||||
galera_node_address => $galera_node_address,
|
||||
galera_node_address => $galera_node_address,
|
||||
galera_nodes => $galera_nodes,
|
||||
enabled => $enabled,
|
||||
custom_setup_class => $custom_setup_class,
|
||||
mysql_skip_name_resolve => $mysql_skip_name_resolve,
|
||||
use_syslog => $use_syslog,
|
||||
config_hash => {
|
||||
'config_file' => '/etc/my.cnf'
|
||||
},
|
||||
config_hash => $config_hash_real,
|
||||
}
|
||||
|
||||
# This removes default users and guest access
|
||||
|
||||
Reference in New Issue
Block a user