Add rabbitmq max_retries and retry_interval in heat conf

Oslo.message using rabbit_max_retries and rabbit_retry_interval to
define reconnect rabbitmq server times and interval when can not
connect to rabbitmq server.

Change-Id: I261d3f31aa89f845d88ee4cbd1acb56c9131ba47
Closes-bug: #1439968
This commit is contained in:
wenchma 2015-06-12 15:01:46 +08:00
parent e5627ca58b
commit 5259486ff4
3 changed files with 11 additions and 3 deletions

View File

@ -18,5 +18,5 @@ recipe 'openstack-orchestration::identity_registration', 'Registers Heat service
supports os
end
depends 'openstack-common', '>= 11.0.0'
depends 'openstack-common', '>= 11.2.0'
depends 'openstack-identity', '>= 11.0.0'

View File

@ -434,6 +434,14 @@ shared_examples 'expects to create heat conf' do
expect(chef_run).to render_config_file(file.name).with_section_content('oslo_messaging_rabbit', /^kombu_ssl_version=TLSv1.2$/)
end
it 'has the default rabbit_retry_interval set' do
expect(chef_run).to render_config_file(file.name).with_section_content('oslo_messaging_rabbit', /^rabbit_retry_interval=1$/)
end
it 'has the default rabbit_max_retries set' do
expect(chef_run).to render_config_file(file.name).with_section_content('oslo_messaging_rabbit', /^rabbit_max_retries=0$/)
end
end
end
end

View File

@ -1417,7 +1417,7 @@ rabbit_virtual_host=<%= node["openstack"]["mq"]["orchestration"]["rabbit"]["vhos
# How frequently to retry connecting with RabbitMQ. (integer
# value)
#rabbit_retry_interval=1
rabbit_retry_interval=<%= node["openstack"]["mq"]["orchestration"]["rabbit"]["rabbit_retry_interval"] %>
# How long to backoff for between retries when connecting to
# RabbitMQ. (integer value)
@ -1425,7 +1425,7 @@ rabbit_virtual_host=<%= node["openstack"]["mq"]["orchestration"]["rabbit"]["vhos
# Maximum number of RabbitMQ connection retries. Default is 0
# (infinite retry count). (integer value)
#rabbit_max_retries=0
rabbit_max_retries=<%= node["openstack"]["mq"]["orchestration"]["rabbit"]["rabbit_max_retries"] %>
# Number of seconds after which the Rabbit broker is considered down if
# heartbeat's keep-alive fails (0 disable the heartbeat). (integer value)