Files
puppet-openstack-integration/manifests/params.pp
Takashi Kajinami 1ed8e5b866 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] 085d356902

Conflicts:
	manifests/ironic.pp

(yoga to xena)
Conflicts:
	manifests/octavia.pp

(xena to wallaby)
Backport note:
This change also covers Panko which was retired during Xena cycle.

Change-Id: I56f31397669d3d7b08aa2e9808947141e003ab0b
(cherry picked from commit 9c2d58221c)
(cherry picked from commit b8ad2df96a)
(cherry picked from commit 8bf381e97b)
2022-08-15 23:03:42 +09:00

31 lines
1.1 KiB
Puppet

class openstack_integration::params {
case $::osfamily {
'RedHat': {
$ca_bundle_cert_path = '/etc/ssl/certs/ca-bundle.crt'
$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'
$cert_path = '/usr/local/share/ca-certificates/puppet_openstack.crt'
$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: {
fail("Unsupported osfamily: ${::osfamily} operatingsystem")
}
}
}