From bdbabac9fcfa1793fb6c602aa06ebf7c2f0f9e6f Mon Sep 17 00:00:00 2001 From: Pavel Glushchak Date: Thu, 3 Nov 2016 15:42:55 +0300 Subject: [PATCH] fixed cluster::mysql requires mysql client installed cluster::mysql calls `mysql` command in create-init-file However mysql client package is not installed at a moment, when this command is executed. Thus it fails. Change-Id: Iaf4dd8f8ffe58e47bef07df04952d889a8c32212 Closes-Bug: #1638904 Signed-off-by: Pavel Glushchak --- .../puppet/osnailyfacter/manifests/database/database.pp | 5 +++++ tests/noop/spec/hosts/database/database_spec.rb | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/deployment/puppet/osnailyfacter/manifests/database/database.pp b/deployment/puppet/osnailyfacter/manifests/database/database.pp index b13bedbee1..372087f41e 100644 --- a/deployment/puppet/osnailyfacter/manifests/database/database.pp +++ b/deployment/puppet/osnailyfacter/manifests/database/database.pp @@ -309,12 +309,17 @@ class osnailyfacter::database::database { only_from => "127.0.0.1 240.0.0.2 ${management_networks}", } + class { '::openstack::galera::client': + custom_setup_class => $custom_setup_class, + } + # include our integration with pacemaker class { '::cluster::mysql': mysql_user => $status_user, mysql_password => $status_password, mysql_config => '/etc/mysql/my.cnf', mysql_socket => $mysql_socket, + require => Class['::openstack::galera::client'], } # this overrides /root/.my.cnf created by mysql::server::root_password diff --git a/tests/noop/spec/hosts/database/database_spec.rb b/tests/noop/spec/hosts/database/database_spec.rb index 2b723a3c11..420f9ffba4 100644 --- a/tests/noop/spec/hosts/database/database_spec.rb +++ b/tests/noop/spec/hosts/database/database_spec.rb @@ -195,6 +195,10 @@ describe manifest do ) end + it 'should install mysql client package' do + should contain_class('openstack::galera::client') + end + it 'should configure pacemaker with mysql service' do should contain_class('cluster::mysql').with( :mysql_user => 'clustercheck',