Add rabbitmq max_retries and retry_interval in cinder 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: I449f7be68dd9c9adbad587a47cf9d9dcc3462369
Closes-bug: #1439968
This commit is contained in:
wenchma 2015-06-12 14:48:03 +08:00
parent 0b94103098
commit 3c0ceb9f4c
3 changed files with 11 additions and 3 deletions

View File

@ -20,7 +20,7 @@ recipe 'openstack-block-storage::backup', 'Installs the cinder-backup service'
end
depends 'apt', '~> 2.6.1'
depends 'openstack-common', '>= 11.0.0'
depends 'openstack-common', '>= 11.2.0'
depends 'openstack-identity', '>= 11.0.0'
depends 'openstack-image', '>= 11.0.0'
depends 'selinux', '~> 0.9.0'

View File

@ -437,6 +437,14 @@ describe 'openstack-block-storage::cinder-common' 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
context 'qpid as mq service' do

View File

@ -1325,14 +1325,14 @@ rabbit_virtual_host=<%= node["openstack"]["mq"]["block-storage"]["rabbit"]["vhos
notification_topics=<%= node["openstack"]["mq"]["block-storage"]["rabbit"]["notification_topic"] %>
#### (ListOpt) AMQP topic used for openstack notifications
# rabbit_retry_interval=1
rabbit_retry_interval=<%= node["openstack"]["mq"]["block-storage"]["rabbit"]["rabbit_retry_interval"] %>
#### (IntOpt) how frequently to retry connecting with RabbitMQ
# rabbit_retry_backoff=2
#### (IntOpt) how long to backoff for between retries when connecting to
#### RabbitMQ
# rabbit_max_retries=0
rabbit_max_retries=<%= node["openstack"]["mq"]["block-storage"]["rabbit"]["rabbit_max_retries"] %>
#### (IntOpt) maximum retries with trying to connect to RabbitMQ (the
#### default of 0 implies an infinite retry count)