Fix apt discrepancy around mysql client package

When we run galera/mysql packages installation
we can get into dependencies issues with  mysql
client package as it is not installed at the time
when perl dbd module requires it. At the same time
libperl-dbd-mysql is depending on it, so it fails.
Instead we need to ensure that mysql client is installed
along with its libraries prior to installing additional
packages for galera.

Change-Id: Idc91a399a46cd63c2201660bb248c0a0ad3fb9b8
Closes-bug: #1651182
This commit is contained in:
Vladimir Kuklin 2017-01-04 18:27:58 +03:00
parent c201eaf73a
commit 7583f5cb17
2 changed files with 10 additions and 0 deletions

View File

@ -295,6 +295,12 @@ class osnailyfacter::database::database {
override_options => $override_options,
}
# LP 1651182
# Ensure that client library replacement is installed before we try
# to install additional packages
Class["mysql::client"] -> Package[$::galera::params::additional_packages]
# Make sure the mysql service is stopped with upstart as we will be starting
# it with pacemaker
Exec <| title == 'clean_up_ubuntu' |> {

View File

@ -174,6 +174,10 @@ describe manifest do
expect(graph).to ensure_transitive_dependency("Class[cluster::galera_status]", "Haproxy_backend_status[mysql]")
end
it 'should have explicit ordering between the client binary and additional packages' do
expect(graph).to ensure_transitive_dependency("Class[mysql::client]", "Package[percona-xtrabackup]")
end
it 'should setup the /root/.my.cnf' do
should contain_class('osnailyfacter::mysql_access').with(
:db_password => mysql_database_password