Browse Source

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
tags/9.2
Vladimir Kuklin 2 years ago
parent
commit
abeaf1f50a
2 changed files with 10 additions and 0 deletions
  1. +6
    -0
      deployment/puppet/osnailyfacter/manifests/database/database.pp
  2. +4
    -0
      tests/noop/spec/hosts/database/database_spec.rb

+ 6
- 0
deployment/puppet/osnailyfacter/manifests/database/database.pp View File

@@ -286,6 +286,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' |> {

+ 4
- 0
tests/noop/spec/hosts/database/database_spec.rb View File

@@ -162,6 +162,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

Loading…
Cancel
Save