mysql/client: create tripleo.cnf everytime
If TLS isn't enabled, Augeas won't create tripleo.cnf but Docker will
create the file itself while mount binding it into the container.
With podman, the files/dirs that don't exist aren't created (probably
for the best), so let's create this empty file so podman can mount it
anyway.
We need to backport this commit to support a change in paunch that
only starts docker if the mounts exist
Blueprint podman-support
Co-Authored-By: Cédric Jeanneret <cjeanner@redhat.com>
Needed-By: https://review.opendev.org/#/c/673561/
(cherry picked from commit 5a96b2ec0c
)
Change-Id: Ib46505fa1426e5c9ab0345ee186540ca5b983d92
This commit is contained in:
parent
fe10653c3f
commit
1ef0aca325
|
@ -101,10 +101,14 @@ class tripleo::profile::base::database::mysql::client (
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
file { $mysql_read_default_file:
|
||||||
|
ensure => file,
|
||||||
|
}
|
||||||
augeas { 'tripleo-mysql-client-conf':
|
augeas { 'tripleo-mysql-client-conf':
|
||||||
incl => $mysql_read_default_file,
|
incl => $mysql_read_default_file,
|
||||||
lens => 'Puppet.lns',
|
lens => 'Puppet.lns',
|
||||||
changes => $conf_changes,
|
changes => $conf_changes,
|
||||||
|
require => File[$mysql_read_default_file],
|
||||||
}
|
}
|
||||||
|
|
||||||
# If a profile created a file resource for the parent directory,
|
# If a profile created a file resource for the parent directory,
|
||||||
|
|
|
@ -30,6 +30,9 @@ describe 'tripleo::profile::base::database::mysql::client' do
|
||||||
|
|
||||||
it {
|
it {
|
||||||
is_expected.to contain_exec('directory-create-etc-my.cnf.d')
|
is_expected.to contain_exec('directory-create-etc-my.cnf.d')
|
||||||
|
is_expected.to contain_file('/etc/my.cnf.d/tripleo.cnf').with(
|
||||||
|
:ensure => 'file',
|
||||||
|
)
|
||||||
is_expected.to contain_augeas('tripleo-mysql-client-conf').with(
|
is_expected.to contain_augeas('tripleo-mysql-client-conf').with(
|
||||||
:incl => '/etc/my.cnf.d/tripleo.cnf',
|
:incl => '/etc/my.cnf.d/tripleo.cnf',
|
||||||
:changes => [
|
:changes => [
|
||||||
|
|
Loading…
Reference in New Issue