Browse Source

Allow oslo rabbit heartbeat configuration

In order to allow components to better handle and respond to mq failures,
oslo has some heartbeat options that are useful.

Change-Id: I453b04c90e6caba7c00cf239035af05199bb5c36
Partial-Bug: #1462438
tags/kilo-eol
Mark Vanderwiel 4 years ago
parent
commit
a84a144339
2 changed files with 17 additions and 0 deletions
  1. 11
    0
      spec/spec_helper.rb
  2. 6
    0
      templates/default/heat.conf.erb

+ 11
- 0
spec/spec_helper.rb View File

@@ -404,6 +404,17 @@ shared_examples 'expects to create heat conf' do
404 404
         node.set['openstack']['mq']['orchestration']['service_type'] = 'rabbitmq'
405 405
       end
406 406
 
407
+      it 'has default rabbit values' do
408
+        [/^rpc_conn_pool_size=30$/,
409
+         /^amqp_durable_queues=false$/,
410
+         /^amqp_auto_delete=false$/,
411
+         /^heartbeat_timeout_threshold=0$/,
412
+         /^heartbeat_rate=2$/
413
+        ].each do |line|
414
+          expect(chef_run).to render_config_file(file.name).with_section_content('oslo_messaging_rabbit', line)
415
+        end
416
+      end
417
+
407 418
       it 'does not have rabbit ha values' do
408 419
         [
409 420
           /^rabbit_host=127.0.0.1$/,

+ 6
- 0
templates/default/heat.conf.erb View File

@@ -1345,6 +1345,12 @@ qpid_reconnect_interval=<%= node["openstack"]["mq"]["orchestration"]["qpid"]["re
1345 1345
 <% if @mq_service_type == "rabbitmq"  %>
1346 1346
 [oslo_messaging_rabbit]
1347 1347
 
1348
+# Number of seconds after which the Rabbit broker is considered down if heartbeat's keep-alive fails (0 disable the heartbeat)
1349
+heartbeat_timeout_threshold=<%= node['openstack']['mq']['orchestration']['rabbit']['heartbeat_timeout_threshold'] %>
1350
+
1351
+# How often times during the heartbeat_timeout_threshold we check the heartbeat
1352
+heartbeat_rate=<%= node['openstack']['mq']['orchestration']['rabbit']['heartbeat_rate'] %>
1353
+
1348 1354
 # Use durable queues in amqp. (boolean value)
1349 1355
 # Deprecated group/name - [DEFAULT]/rabbit_durable_queues
1350 1356
 amqp_durable_queues=<%= node['openstack']['mq']['orchestration']['durable_queues'] %>

Loading…
Cancel
Save