Ubuntu: Use utf8mb3_general_ci collate in MySQL
Currently idempotency in Ubuntu is broken because of the below change detected in collate in MySQL. ``` /Stage[main]/Keystone::Db::Mysql/Openstacklib::Db::Mysql[keystone]/ Mysql_database[keystone]/collate: collate changed 'utf8mb3_general_ci' to 'utf8_general_ci' ``` Similarly to what we observed in the past about charset[1], it seems MySQL in Ubuntu is automatically converting the collate value and that is causing the "unexpected" change detected in the 2nd puppet run. This fixes the idempotency by using utf8mb3_general_ci in Ubuntu to avoid the mismatch caused by internal translation. [1] 085d3569021441810c1dff7c8f4396003c690805 Change-Id: I56f31397669d3d7b08aa2e9808947141e003ab0b
This commit is contained in:
parent
17bc02710a
commit
9c2d58221c
@ -52,6 +52,7 @@ class openstack_integration::aodh (
|
||||
}
|
||||
class { 'aodh::db::mysql':
|
||||
charset => $::openstack_integration::params::mysql_charset,
|
||||
collate => $::openstack_integration::params::mysql_collate,
|
||||
password => 'aodh',
|
||||
}
|
||||
class { 'aodh::keystone::auth':
|
||||
|
@ -19,6 +19,7 @@ class openstack_integration::barbican {
|
||||
include barbican
|
||||
class { 'barbican::db::mysql':
|
||||
charset => $::openstack_integration::params::mysql_charset,
|
||||
collate => $::openstack_integration::params::mysql_collate,
|
||||
password => 'barbican',
|
||||
}
|
||||
class { 'barbican::db':
|
||||
|
@ -43,6 +43,7 @@ class openstack_integration::cinder (
|
||||
include cinder::client
|
||||
class { 'cinder::db::mysql':
|
||||
charset => $::openstack_integration::params::mysql_charset,
|
||||
collate => $::openstack_integration::params::mysql_collate,
|
||||
password => 'cinder',
|
||||
}
|
||||
class { 'cinder::keystone::auth':
|
||||
|
@ -22,6 +22,7 @@ class openstack_integration::designate {
|
||||
|
||||
class { 'designate::db::mysql':
|
||||
charset => $::openstack_integration::params::mysql_charset,
|
||||
collate => $::openstack_integration::params::mysql_collate,
|
||||
password => 'designate',
|
||||
}
|
||||
class { 'designate::logging':
|
||||
|
@ -13,6 +13,7 @@ class openstack_integration::ec2api {
|
||||
}
|
||||
class { 'ec2api::db::mysql':
|
||||
charset => $::openstack_integration::params::mysql_charset,
|
||||
collate => $::openstack_integration::params::mysql_collate,
|
||||
password => 'ec2api',
|
||||
}
|
||||
case $::osfamily {
|
||||
|
@ -29,6 +29,7 @@ class openstack_integration::glance (
|
||||
|
||||
class { 'glance::db::mysql':
|
||||
charset => $::openstack_integration::params::mysql_charset,
|
||||
collate => $::openstack_integration::params::mysql_collate,
|
||||
password => 'glance',
|
||||
}
|
||||
include glance
|
||||
|
@ -42,6 +42,7 @@ class openstack_integration::gnocchi (
|
||||
}
|
||||
class { 'gnocchi::db::mysql':
|
||||
charset => $::openstack_integration::params::mysql_charset,
|
||||
collate => $::openstack_integration::params::mysql_collate,
|
||||
password => 'gnocchi',
|
||||
}
|
||||
|
||||
|
@ -70,6 +70,7 @@ class openstack_integration::heat (
|
||||
}
|
||||
class { 'heat::db::mysql':
|
||||
charset => $::openstack_integration::params::mysql_charset,
|
||||
collate => $::openstack_integration::params::mysql_collate,
|
||||
password => 'heat',
|
||||
}
|
||||
class { 'heat::keystone::auth':
|
||||
|
@ -34,6 +34,7 @@ class openstack_integration::ironic {
|
||||
}
|
||||
class { 'ironic::db::mysql':
|
||||
charset => $::openstack_integration::params::mysql_charset,
|
||||
collate => $::openstack_integration::params::mysql_collate,
|
||||
password => 'ironic',
|
||||
}
|
||||
class { 'ironic::keystone::auth':
|
||||
@ -80,6 +81,7 @@ class openstack_integration::ironic {
|
||||
# Ironic inspector resources
|
||||
class { 'ironic::inspector::db::mysql':
|
||||
charset => $::openstack_integration::params::mysql_charset,
|
||||
collate => $::openstack_integration::params::mysql_collate,
|
||||
password => 'a_big_secret',
|
||||
}
|
||||
class { 'ironic::inspector::authtoken':
|
||||
|
@ -45,6 +45,7 @@ class openstack_integration::keystone (
|
||||
}
|
||||
class { 'keystone::db::mysql':
|
||||
charset => $::openstack_integration::params::mysql_charset,
|
||||
collate => $::openstack_integration::params::mysql_collate,
|
||||
password => 'keystone',
|
||||
}
|
||||
class { 'keystone::db':
|
||||
|
@ -56,6 +56,7 @@ class openstack_integration::magnum (
|
||||
|
||||
class { 'magnum::db::mysql':
|
||||
charset => $::openstack_integration::params::mysql_charset,
|
||||
collate => $::openstack_integration::params::mysql_collate,
|
||||
password => 'magnum',
|
||||
}
|
||||
|
||||
|
@ -43,6 +43,7 @@ class openstack_integration::mistral {
|
||||
}
|
||||
class { 'mistral::db::mysql':
|
||||
charset => $::openstack_integration::params::mysql_charset,
|
||||
collate => $::openstack_integration::params::mysql_collate,
|
||||
password => 'mistral',
|
||||
}
|
||||
class { 'mistral::api':
|
||||
|
@ -41,6 +41,7 @@ class openstack_integration::murano {
|
||||
|
||||
class { 'murano::db::mysql':
|
||||
charset => $::openstack_integration::params::mysql_charset,
|
||||
collate => $::openstack_integration::params::mysql_collate,
|
||||
password => 'a_big_secret',
|
||||
}
|
||||
class { 'murano::logging':
|
||||
|
@ -116,6 +116,7 @@ class openstack_integration::neutron (
|
||||
|
||||
class { 'neutron::db::mysql':
|
||||
charset => $::openstack_integration::params::mysql_charset,
|
||||
collate => $::openstack_integration::params::mysql_collate,
|
||||
password => 'neutron',
|
||||
}
|
||||
class { 'neutron::keystone::auth':
|
||||
|
@ -64,10 +64,12 @@ class openstack_integration::nova (
|
||||
|
||||
class { 'nova::db::mysql':
|
||||
charset => $::openstack_integration::params::mysql_charset,
|
||||
collate => $::openstack_integration::params::mysql_collate,
|
||||
password => 'nova',
|
||||
}
|
||||
class { 'nova::db::mysql_api':
|
||||
charset => $::openstack_integration::params::mysql_charset,
|
||||
collate => $::openstack_integration::params::mysql_collate,
|
||||
password => 'nova',
|
||||
}
|
||||
include nova::cell_v2::simple_setup
|
||||
|
@ -67,6 +67,7 @@ class openstack_integration::octavia (
|
||||
}
|
||||
class { 'octavia::db::mysql':
|
||||
charset => $::openstack_integration::params::mysql_charset,
|
||||
collate => $::openstack_integration::params::mysql_collate,
|
||||
password => 'octavia',
|
||||
}
|
||||
class { 'octavia::keystone::auth':
|
||||
|
@ -6,6 +6,7 @@ class openstack_integration::params {
|
||||
$cert_path = '/etc/pki/ca-trust/source/anchors/puppet_openstack.pem'
|
||||
$update_ca_certs_cmd = '/usr/bin/update-ca-trust force-enable && /usr/bin/update-ca-trust extract'
|
||||
$mysql_charset = 'utf8'
|
||||
$mysql_collate = 'utf8_general_ci'
|
||||
}
|
||||
'Debian': {
|
||||
$ca_bundle_cert_path = '/etc/ssl/certs/puppet_openstack.pem'
|
||||
@ -13,10 +14,12 @@ class openstack_integration::params {
|
||||
$update_ca_certs_cmd = '/usr/sbin/update-ca-certificates -f'
|
||||
if $::operatingsystem == 'Debian' {
|
||||
$mysql_charset = 'utf8'
|
||||
$mysql_collate = 'utf8_general_ci'
|
||||
} else {
|
||||
# TODO(tkajinam): This is to fix the gate quickly. We should revisit
|
||||
# this later. utf8mb4 would be the preferred option
|
||||
$mysql_charset = 'utf8mb3'
|
||||
$mysql_collate = 'utf8mb3_general_ci'
|
||||
}
|
||||
}
|
||||
default: {
|
||||
|
@ -17,6 +17,7 @@ class openstack_integration::placement {
|
||||
|
||||
class { 'placement::db::mysql':
|
||||
charset => $::openstack_integration::params::mysql_charset,
|
||||
collate => $::openstack_integration::params::mysql_collate,
|
||||
password => 'placement',
|
||||
}
|
||||
|
||||
|
@ -26,6 +26,7 @@ class openstack_integration::sahara (
|
||||
|
||||
class { 'sahara::db::mysql':
|
||||
charset => $::openstack_integration::params::mysql_charset,
|
||||
collate => $::openstack_integration::params::mysql_collate,
|
||||
password => 'sahara',
|
||||
}
|
||||
|
||||
|
@ -47,6 +47,7 @@ class openstack_integration::trove {
|
||||
}
|
||||
class { 'trove::db::mysql':
|
||||
charset => $::openstack_integration::params::mysql_charset,
|
||||
collate => $::openstack_integration::params::mysql_collate,
|
||||
password => 'trove',
|
||||
}
|
||||
class { 'trove::keystone::auth':
|
||||
|
@ -18,6 +18,7 @@ class openstack_integration::vitrage {
|
||||
|
||||
class { 'vitrage::db::mysql':
|
||||
charset => $::openstack_integration::params::mysql_charset,
|
||||
collate => $::openstack_integration::params::mysql_collate,
|
||||
password => 'vitrage',
|
||||
}
|
||||
|
||||
|
@ -17,6 +17,7 @@ class openstack_integration::watcher {
|
||||
}
|
||||
class { 'watcher::db::mysql':
|
||||
charset => $::openstack_integration::params::mysql_charset,
|
||||
collate => $::openstack_integration::params::mysql_collate,
|
||||
password => 'watcher',
|
||||
}
|
||||
class { 'watcher::db':
|
||||
|
@ -14,6 +14,7 @@ class openstack_integration::zaqar {
|
||||
}
|
||||
class { 'zaqar::db::mysql':
|
||||
charset => $::openstack_integration::params::mysql_charset,
|
||||
collate => $::openstack_integration::params::mysql_collate,
|
||||
password => 'zaqar',
|
||||
}
|
||||
class { 'zaqar::keystone::auth':
|
||||
|
Loading…
x
Reference in New Issue
Block a user