Add another workaround for the issue#153 of rabbit cookbook

Append the patch https://review.openstack.org/#/c/128203/

Change-Id: I5a47a652b7285e2ac902355475d0680d642ca54e
Closes-Bug: #1380940
This commit is contained in:
wenchma 2014-10-30 11:50:03 +08:00
parent 4a0b9cf241
commit 12e3502ed8
3 changed files with 11 additions and 0 deletions

View File

@ -9,6 +9,7 @@ This file is used to list changes made in each version of cookbook-openstack-ops
* No need to push our rabbit user/password to rabbit cookbook
* Add a temp workaround for an issue #153 in rabbit cookbook to notify
rabbitmq-server to restart immediately.
* Add another workaround for the issue #153 in rabbit cookbook.
## 10.0.0
* Upgrading to Juno

View File

@ -104,5 +104,7 @@ end
# TODO(wenchma) This could be removed once the issue is fixed in rabbitmq cookbook.
# Issue: https://github.com/kennonkwok/rabbitmq/issues/153
# Notifies rabbitmq-server service restart.
r = resources(template: "#{node['rabbitmq']['config_root']}/rabbitmq-env.conf")
r.notifies(:restart, "service[#{node['rabbitmq']['service_name']}]", :immediately)
r = resources(template: "#{node['rabbitmq']['config_root']}/rabbitmq.config")
r.notifies(:restart, "service[#{node['rabbitmq']['service_name']}]", :immediately)

View File

@ -125,6 +125,14 @@ describe 'openstack-ops-messaging::rabbitmq-server' do
).with(user: 'not-a-guest', tag: 'administrator')
end
describe 'template rabbitmq-env.conf notifies immediately' do
let(:template) { chef_run.template('/etc/rabbitmq/rabbitmq-env.conf') }
it 'sends the specific notification to the service immediately' do
expect(template).to notify('service[rabbitmq-server]').to(:restart).immediately
end
end
describe 'notifies immediately' do
let(:template) { chef_run.template('/etc/rabbitmq/rabbitmq.config') }