commit 6913db25d29b56d87d558d564d1bc704e0f7fd06 Author: Jens Harbott Date: Fri Oct 9 07:50:23 2020 +0200 Add notify to mariadb_galera_configuration Need to trigger a restart after changing the galera configuration. Increased patch version number for stable backport. Change-Id: Ie148e8dce2e945ea956f6521c04bfc031f9da3f2 (cherry picked from commit e535ac3083cba2a0d8de5b19ee424f1e81c8ed70) diff --git a/metadata.rb b/metadata.rb index 75b2f77..4b60d22 100755 --- a/metadata.rb +++ b/metadata.rb @@ -3,7 +3,7 @@ maintainer 'openstack-chef' maintainer_email 'openstack-discuss@lists.openstack.org' license 'Apache-2.0' description 'Provides the shared database configuration for OpenStack' -version '19.3.0' +version '19.3.1' %w(ubuntu redhat centos).each do |os| supports os diff --git a/recipes/mariadb-cluster-server.rb b/recipes/mariadb-cluster-server.rb index 39889bf..0b91f9a 100644 --- a/recipes/mariadb-cluster-server.rb +++ b/recipes/mariadb-cluster-server.rb @@ -60,6 +60,7 @@ mariadb_galera_configuration 'MariaDB Galera Configuration' do gcomm_address gcomm_address wsrep_provider_options provider_options wsrep_sst_method 'rsync' + notifies :restart, 'service[mysql]', :immediately end # Install clustercheck tool diff --git a/spec/mariadb-cluster-server_spec.rb b/spec/mariadb-cluster-server_spec.rb index c4493d9..171f210 100644 --- a/spec/mariadb-cluster-server_spec.rb +++ b/spec/mariadb-cluster-server_spec.rb @@ -27,6 +27,10 @@ describe 'openstack-ops-database::mariadb-cluster-server' do end it do + expect(chef_run.mariadb_galera_configuration('MariaDB Galera Configuration')).to notify('service[mysql]').to(:restart).immediately + end + + it do expect(chef_run).to create_if_missing_cookbook_file('/usr/bin/clustercheck').with( source: 'clustercheck', owner: 'root',