Debian.cnf must be in sync on all nodes.
Fix regression. This caused "random" restart problem on Galera cluster. As soon as the nodes were synchronized, they wouldn't restart properly. This close GH-126
This commit is contained in:
@@ -49,7 +49,6 @@ class cloud::database::sql (
|
||||
$neutron_db_password = $os_params::neutron_db_password,
|
||||
$neutron_db_allowed_hosts = $os_params::neutron_db_allowed_hosts,
|
||||
$mysql_root_password = $os_params::mysql_root_password,
|
||||
$mysql_sys_maint_user = $os_params::mysql_sys_maint_user,
|
||||
$mysql_sys_maint_password = $os_params::mysql_sys_maint_password,
|
||||
$galera_clustercheck_dbuser = $os_params::galera_clustercheck_dbuser,
|
||||
$galera_clustercheck_dbpassword = $os_params::galera_clustercheck_dbuser,
|
||||
@@ -87,6 +86,21 @@ class cloud::database::sql (
|
||||
service_name => 'mysql'
|
||||
}
|
||||
$wsrep_provider = '/usr/lib/galera/libgalera_smm.so'
|
||||
|
||||
database_user { 'debian-sys-maint@localhost':
|
||||
ensure => 'present',
|
||||
password_hash => mysql_password($mysql_sys_maint_password),
|
||||
provider => 'mysql',
|
||||
require => File['/root/.my.cnf']
|
||||
}
|
||||
file{'/etc/mysql/sys.cnf':
|
||||
ensure => file,
|
||||
content => template('cloud/database/debian.cnf.erb'),
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0600',
|
||||
require => Exec['clean-mysql-binlog'],
|
||||
}
|
||||
}
|
||||
default: {
|
||||
err "${::osfamily} not supported yet"
|
||||
@@ -197,13 +211,6 @@ class cloud::database::sql (
|
||||
privileges => ['all']
|
||||
}
|
||||
|
||||
database_user { "${mysql_sys_maint_user}@localhost":
|
||||
ensure => 'present',
|
||||
password_hash => mysql_password($mysql_sys_maint_password),
|
||||
provider => 'mysql',
|
||||
require => File['/root/.my.cnf']
|
||||
}
|
||||
|
||||
Database_user<<| |>>
|
||||
} else {
|
||||
$gcomm_definition = $gcomm_base
|
||||
@@ -265,15 +272,6 @@ class cloud::database::sql (
|
||||
onlyif => "stat ${::mysql::params::datadir}/ib_logfile0 && test `du -sh ${::mysql::params::datadir}/ib_logfile0 | cut -f1` != '256M'",
|
||||
}
|
||||
|
||||
file{'/etc/mysql/sys.cnf':
|
||||
ensure => file,
|
||||
content => template('cloud/database/sys.cnf.erb'),
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0600',
|
||||
require => Exec['clean-mysql-binlog'],
|
||||
}
|
||||
|
||||
# TODO/WARNING(Gonéri): template changes do not trigger configuration changes
|
||||
mysql::server::config{'basic_config':
|
||||
notify_service => true,
|
||||
|
@@ -3,12 +3,12 @@
|
||||
#
|
||||
[client]
|
||||
host = localhost
|
||||
user = sys-maint
|
||||
user = debian-sys-maint
|
||||
password = <%= @mysql_sys_maint_password %>
|
||||
socket = /var/run/mysqld/mysqld.sock
|
||||
[mysql_upgrade]
|
||||
host = localhost
|
||||
user = sys-maint
|
||||
user = debian-sys-maint
|
||||
password = <%= @mysql_sys_maint_password %>
|
||||
socket = /var/run/mysqld/mysqld.sock
|
||||
basedir = /usr
|
Reference in New Issue
Block a user