MySQL: change default MySQL collate to utf8_general_ci
Install & configure MySQL database by using utf8_general_ci collation which is the way documented in OpenStack [1] and already the default in puppetlabs-mysql [2]. [1] http://goo.gl/GA5gyZ [2] https://github.com/puppetlabs/puppetlabs-mysql/blob/master/manifests/db.pp#L7 This is affecting Puppetfile to update all modules to stable/juno that contains this commit. Also affecting MySQL monitoring database to make sure we have the right collation. Also updating puppet-nova manifest for MySQL Slave connection and use nova::db. Also updating nova-compute libvirt class. Change-Id: Ib8ce10949038b915ebd70f1b22ca3c147b7b149b
This commit is contained in:
parent
c9ba99acaf
commit
ef4cc0f0d0
22
Puppetfile
22
Puppetfile
@ -19,40 +19,40 @@ forge 'http://forge.puppetlabs.com'
|
||||
# OpenStack projects
|
||||
mod 'openstacklib',
|
||||
:git => 'git://github.com/enovance/puppet-openstacklib.git',
|
||||
:ref => '999f7849a3e0653f46f7336ee0fa9c2e38630b7b'
|
||||
:ref => '176d7d65911eafab9d04d2053e77c69ff2c40e44'
|
||||
mod 'ceilometer',
|
||||
:git => 'git://github.com/enovance/puppet-ceilometer.git',
|
||||
:ref => 'c5c7f4a6a7afd4b9c558e17e5a755e836e182dbe'
|
||||
:ref => '64d8cfb8c1637871bba8c692d0c8184b75aceba2'
|
||||
mod 'cinder',
|
||||
:git => 'git://github.com/enovance/puppet-cinder.git',
|
||||
:ref => '3247b8e9844afa0b7b1ddc0bff5361c6f0811e5d'
|
||||
:ref => '8d9524fac34daf7ef0ac336ef32fd3f75b6bddb1'
|
||||
mod 'glance',
|
||||
:git => 'git://github.com/enovance/puppet-glance.git',
|
||||
:ref => '9fb3db4a693b6839c2caa45df4cd37f9c21451de'
|
||||
:ref => '57685754d3e96cfaf863c9a98bf6b517e4ddb334'
|
||||
mod 'heat',
|
||||
:git => 'git://github.com/enovance/puppet-heat.git',
|
||||
:ref => '46b45265cc2cc3da6d45a89097357a976f045948'
|
||||
:ref => 'f2d08f6c340e19ad39d257f7a82c57afe6e342cc'
|
||||
mod 'horizon',
|
||||
:git => 'git://github.com/enovance/puppet-horizon.git',
|
||||
:ref => '72e83fa859c4224fcf7772654bdc7464a0bbedde'
|
||||
:ref => 'f04c63881735c59a4d74390f20a35edd3a69e71e'
|
||||
mod 'keystone',
|
||||
:git => 'git://github.com/enovance/puppet-keystone.git',
|
||||
:ref => '9b540464869ecf20a012ba15ebde2aaa6b99be09'
|
||||
:ref => '4b2623d4ec41957b0274d8a457e3019fdf1e342b'
|
||||
mod 'neutron',
|
||||
:git => 'git://github.com/enovance/puppet-neutron.git',
|
||||
:ref => '5500e4c0b2bce10ebc91a9685309cf854db2d2dc'
|
||||
:ref => 'd5628a9ca16140e3c08c98d56feecaf56e898f35'
|
||||
mod 'nova',
|
||||
:git => 'git://github.com/enovance/puppet-nova.git',
|
||||
:ref => '2a5c1eac6b34ea29bbd3e28d7ee56839f10d83d9'
|
||||
:ref => '43ad85285634f75e8faf082981416ca12c4e3ff3'
|
||||
mod 'swift',
|
||||
:git => 'git://github.com/enovance/puppet-swift.git',
|
||||
:ref => '9a8e28d4ad91b9d638dc2e1e2f4e037ac2831864'
|
||||
:ref => '1e4ebee1e88f946dfe4ed078437dc20b28698b53'
|
||||
mod 'tempest',
|
||||
:git => 'git://github.com/enovance/puppet-tempest.git',
|
||||
:ref => 'f5e87cad5de119bd483006f06efcd22a34d8bdc4'
|
||||
mod 'trove',
|
||||
:git => 'git://github.com/enovance/puppet-trove.git',
|
||||
:ref => '9e5b82fcdacc07b0f1028cb2928292f8d68ae075'
|
||||
:ref => ''
|
||||
|
||||
# Dependency
|
||||
mod 'apache',
|
||||
|
@ -150,27 +150,30 @@ class cloud::compute(
|
||||
$encoded_user = uriescape($nova_db_user)
|
||||
$encoded_password = uriescape($nova_db_password)
|
||||
|
||||
class { 'nova':
|
||||
database_connection => "mysql://${encoded_user}:${encoded_password}@${nova_db_host}/nova?charset=utf8",
|
||||
database_idle_timeout => $nova_db_idle_timeout,
|
||||
mysql_module => '2.2',
|
||||
rabbit_userid => 'nova',
|
||||
rabbit_hosts => $rabbit_hosts,
|
||||
rabbit_password => $rabbit_password,
|
||||
glance_api_servers => "${ks_glance_internal_proto}://${ks_glance_internal_host}:${glance_api_port}",
|
||||
memcached_servers => $memcache_servers,
|
||||
verbose => $verbose,
|
||||
debug => $debug,
|
||||
log_dir => $log_dir,
|
||||
log_facility => $log_facility,
|
||||
use_syslog => $use_syslog,
|
||||
nova_shell => '/bin/bash',
|
||||
if $nova_db_use_slave {
|
||||
$slave_connection_url = "mysql://${encoded_user}:${encoded_password}@${nova_db_host}:3307/nova?charset=utf8"
|
||||
} else {
|
||||
$slave_connection_url = false
|
||||
}
|
||||
|
||||
if $nova_db_use_slave {
|
||||
nova_config {'database/slave_connection': value => "mysql://${encoded_user}:${encoded_password}@${nova_db_host}:3307/nova?charset=utf8" }
|
||||
} else {
|
||||
nova_config {'database/slave_connection': ensure => absent }
|
||||
class { 'nova::db':
|
||||
database_connection => "mysql://${encoded_user}:${encoded_password}@${nova_db_host}/nova?charset=utf8",
|
||||
slave_connection => $slave_connection_url,
|
||||
database_idle_timeout => $nova_db_idle_timeout,
|
||||
}
|
||||
|
||||
class { 'nova':
|
||||
rabbit_userid => 'nova',
|
||||
rabbit_hosts => $rabbit_hosts,
|
||||
rabbit_password => $rabbit_password,
|
||||
glance_api_servers => "${ks_glance_internal_proto}://${ks_glance_internal_host}:${glance_api_port}",
|
||||
memcached_servers => $memcache_servers,
|
||||
verbose => $verbose,
|
||||
debug => $debug,
|
||||
log_dir => $log_dir,
|
||||
log_facility => $log_facility,
|
||||
use_syslog => $use_syslog,
|
||||
nova_shell => '/bin/bash',
|
||||
}
|
||||
|
||||
class { 'nova::network::neutron':
|
||||
|
@ -382,18 +382,18 @@ Host *
|
||||
}
|
||||
|
||||
class { 'nova::compute::libvirt':
|
||||
libvirt_type => $libvirt_type,
|
||||
libvirt_type => $libvirt_type,
|
||||
# Needed to support migration but we still use Spice:
|
||||
vncserver_listen => '0.0.0.0',
|
||||
migration_support => true,
|
||||
libvirt_disk_cachemodes => $libvirt_disk_cachemodes_real,
|
||||
libvirt_service_name => $::cloud::params::libvirt_service_name,
|
||||
vncserver_listen => '0.0.0.0',
|
||||
migration_support => true,
|
||||
libvirt_disk_cachemodes => $libvirt_disk_cachemodes_real,
|
||||
libvirt_service_name => $::cloud::params::libvirt_service_name,
|
||||
libvirt_inject_key => false,
|
||||
libvirt_inject_partition => '-2',
|
||||
}
|
||||
|
||||
# Extra config for nova-compute
|
||||
nova_config {
|
||||
'libvirt/inject_key': value => false;
|
||||
'libvirt/inject_partition': value => '-2';
|
||||
'libvirt/live_migration_flag': value => 'VIR_MIGRATE_UNDEFINE_SOURCE,VIR_MIGRATE_PEER2PEER,VIR_MIGRATE_LIVE,VIR_MIGRATE_PERSIST_DEST';
|
||||
'libvirt/block_migration_flag': value => 'VIR_MIGRATE_UNDEFINE_SOURCE,VIR_MIGRATE_PEER2PEER,VIR_MIGRATE_LIVE,VIR_MIGRATE_NON_SHARED_INC';
|
||||
}
|
||||
|
@ -298,7 +298,7 @@ class cloud::database::sql::mysql (
|
||||
mysql_database { 'monitoring':
|
||||
ensure => 'present',
|
||||
charset => 'utf8',
|
||||
collate => 'utf8_unicode_ci',
|
||||
collate => 'utf8_general_ci',
|
||||
require => File['/root/.my.cnf']
|
||||
}
|
||||
mysql_user { "${galera_clustercheck_dbuser}@localhost":
|
||||
|
@ -66,11 +66,13 @@ describe 'cloud::compute::api' do
|
||||
:rabbit_password => 'secrete',
|
||||
:rabbit_virtual_host => '/',
|
||||
:memcached_servers => ['10.0.0.1','10.0.0.2'],
|
||||
:database_connection => 'mysql://nova:secrete@10.0.0.1/nova?charset=utf8',
|
||||
:database_idle_timeout => '5000',
|
||||
:glance_api_servers => 'http://10.0.0.1:9292',
|
||||
:log_dir => false
|
||||
)
|
||||
is_expected.to contain_class('nova::db').with(
|
||||
:database_connection => 'mysql://nova:secrete@10.0.0.1/nova?charset=utf8',
|
||||
:database_idle_timeout => '5000',
|
||||
)
|
||||
is_expected.to contain_nova_config('DEFAULT/resume_guests_state_on_host_boot').with('value' => true)
|
||||
is_expected.to contain_nova_config('DEFAULT/default_availability_zone').with('value' => 'MyZone')
|
||||
is_expected.to contain_nova_config('DEFAULT/servicegroup_driver').with_value('mc')
|
||||
|
@ -54,11 +54,13 @@ describe 'cloud::compute::cert' do
|
||||
:rabbit_password => 'secrete',
|
||||
:rabbit_virtual_host => '/',
|
||||
:memcached_servers => ['10.0.0.1','10.0.0.2'],
|
||||
:database_connection => 'mysql://nova:secrete@10.0.0.1/nova?charset=utf8',
|
||||
:database_idle_timeout => '5000',
|
||||
:glance_api_servers => 'http://10.0.0.1:9292',
|
||||
:log_dir => false
|
||||
)
|
||||
is_expected.to contain_class('nova::db').with(
|
||||
:database_connection => 'mysql://nova:secrete@10.0.0.1/nova?charset=utf8',
|
||||
:database_idle_timeout => '5000',
|
||||
)
|
||||
is_expected.to contain_nova_config('DEFAULT/resume_guests_state_on_host_boot').with('value' => true)
|
||||
is_expected.to contain_nova_config('DEFAULT/default_availability_zone').with('value' => 'MyZone')
|
||||
is_expected.to contain_nova_config('DEFAULT/servicegroup_driver').with_value('mc')
|
||||
|
@ -54,11 +54,13 @@ describe 'cloud::compute::conductor' do
|
||||
:rabbit_password => 'secrete',
|
||||
:rabbit_virtual_host => '/',
|
||||
:memcached_servers => ['10.0.0.1','10.0.0.2'],
|
||||
:database_connection => 'mysql://nova:secrete@10.0.0.1/nova?charset=utf8',
|
||||
:database_idle_timeout => '5000',
|
||||
:glance_api_servers => 'http://10.0.0.1:9292',
|
||||
:log_dir => false
|
||||
)
|
||||
is_expected.to contain_class('nova::db').with(
|
||||
:database_connection => 'mysql://nova:secrete@10.0.0.1/nova?charset=utf8',
|
||||
:database_idle_timeout => '5000',
|
||||
)
|
||||
is_expected.to contain_nova_config('DEFAULT/resume_guests_state_on_host_boot').with('value' => true)
|
||||
is_expected.to contain_nova_config('DEFAULT/default_availability_zone').with('value' => 'MyZone')
|
||||
is_expected.to contain_nova_config('DEFAULT/servicegroup_driver').with_value('mc')
|
||||
|
@ -54,11 +54,13 @@ describe 'cloud::compute::consoleauth' do
|
||||
:rabbit_password => 'secrete',
|
||||
:rabbit_virtual_host => '/',
|
||||
:memcached_servers => ['10.0.0.1','10.0.0.2'],
|
||||
:database_connection => 'mysql://nova:secrete@10.0.0.1/nova?charset=utf8',
|
||||
:database_idle_timeout => '5000',
|
||||
:glance_api_servers => 'http://10.0.0.1:9292',
|
||||
:log_dir => false
|
||||
)
|
||||
is_expected.to contain_class('nova::db').with(
|
||||
:database_connection => 'mysql://nova:secrete@10.0.0.1/nova?charset=utf8',
|
||||
:database_idle_timeout => '5000',
|
||||
)
|
||||
is_expected.to contain_nova_config('DEFAULT/resume_guests_state_on_host_boot').with('value' => true)
|
||||
is_expected.to contain_nova_config('DEFAULT/default_availability_zone').with('value' => 'MyZone')
|
||||
is_expected.to contain_nova_config('DEFAULT/servicegroup_driver').with_value('mc')
|
||||
|
@ -58,11 +58,13 @@ describe 'cloud::compute::consoleproxy' do
|
||||
:rabbit_password => 'secrete',
|
||||
:rabbit_virtual_host => '/',
|
||||
:memcached_servers => ['10.0.0.1','10.0.0.2'],
|
||||
:database_connection => 'mysql://nova:secrete@10.0.0.1/nova?charset=utf8',
|
||||
:database_idle_timeout => '5000',
|
||||
:glance_api_servers => 'http://10.0.0.1:9292',
|
||||
:log_dir => false
|
||||
)
|
||||
is_expected.to contain_class('nova::db').with(
|
||||
:database_connection => 'mysql://nova:secrete@10.0.0.1/nova?charset=utf8',
|
||||
:database_idle_timeout => '5000',
|
||||
)
|
||||
is_expected.to contain_nova_config('DEFAULT/resume_guests_state_on_host_boot').with('value' => true)
|
||||
is_expected.to contain_nova_config('DEFAULT/default_availability_zone').with('value' => 'MyZone')
|
||||
is_expected.to contain_nova_config('DEFAULT/servicegroup_driver').with_value('mc')
|
||||
|
@ -90,11 +90,12 @@ describe 'cloud::compute::hypervisor' do
|
||||
:rabbit_password => 'secrete',
|
||||
:rabbit_virtual_host => '/',
|
||||
:memcached_servers => ['10.0.0.1','10.0.0.2'],
|
||||
:glance_api_servers => 'http://10.0.0.1:9292',
|
||||
:log_dir => false
|
||||
)
|
||||
is_expected.to contain_class('nova::db').with(
|
||||
:database_connection => 'mysql://nova:secrete@10.0.0.1/nova?charset=utf8',
|
||||
:database_idle_timeout => '5000',
|
||||
:glance_api_servers => 'http://10.0.0.1:9292',
|
||||
:log_dir => false,
|
||||
:nova_shell => '/bin/bash'
|
||||
)
|
||||
is_expected.to contain_nova_config('DEFAULT/resume_guests_state_on_host_boot').with('value' => true)
|
||||
is_expected.to contain_nova_config('DEFAULT/default_availability_zone').with('value' => 'MyZone')
|
||||
|
@ -60,11 +60,13 @@ describe 'cloud::compute::scheduler' do
|
||||
:rabbit_password => 'secrete',
|
||||
:rabbit_virtual_host => '/',
|
||||
:memcached_servers => ['10.0.0.1','10.0.0.2'],
|
||||
:database_connection => 'mysql://nova:secrete@10.0.0.1/nova?charset=utf8',
|
||||
:database_idle_timeout => '5000',
|
||||
:glance_api_servers => 'http://10.0.0.1:9292',
|
||||
:log_dir => false
|
||||
)
|
||||
is_expected.to contain_class('nova::db').with(
|
||||
:database_connection => 'mysql://nova:secrete@10.0.0.1/nova?charset=utf8',
|
||||
:database_idle_timeout => '5000',
|
||||
)
|
||||
is_expected.to contain_nova_config('DEFAULT/resume_guests_state_on_host_boot').with('value' => true)
|
||||
is_expected.to contain_nova_config('DEFAULT/default_availability_zone').with('value' => 'MyZone')
|
||||
is_expected.to contain_nova_config('DEFAULT/servicegroup_driver').with_value('mc')
|
||||
|
Loading…
x
Reference in New Issue
Block a user