Browse Source

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
tags/kilo-eol
wenchma 4 years ago
parent
commit
3c0ceb9f4c
3 changed files with 11 additions and 3 deletions
  1. 1
    1
      metadata.rb
  2. 8
    0
      spec/cinder_common_spec.rb
  3. 2
    2
      templates/default/cinder.conf.erb

+ 1
- 1
metadata.rb View File

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

+ 8
- 0
spec/cinder_common_spec.rb View File

@@ -437,6 +437,14 @@ describe 'openstack-block-storage::cinder-common' do
437 437
 
438 438
             expect(chef_run).to render_config_file(file.name).with_section_content('oslo_messaging_rabbit', /^kombu_ssl_version=TLSv1.2$/)
439 439
           end
440
+
441
+          it 'has the default rabbit_retry_interval set' do
442
+            expect(chef_run).to render_config_file(file.name).with_section_content('oslo_messaging_rabbit', /^rabbit_retry_interval=1$/)
443
+          end
444
+
445
+          it 'has the default rabbit_max_retries set' do
446
+            expect(chef_run).to render_config_file(file.name).with_section_content('oslo_messaging_rabbit', /^rabbit_max_retries=0$/)
447
+          end
440 448
         end
441 449
 
442 450
         context 'qpid as mq service' do

+ 2
- 2
templates/default/cinder.conf.erb View File

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

Loading…
Cancel
Save