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: Ief96c7fce659376f476b11b527c60ce999777b81
Partial-Bug: #1462438
tags/kilo-eol
Mark Vanderwiel 4 years ago
parent
commit
4b0d6b1ec0
2 changed files with 13 additions and 0 deletions
  1. 7
    0
      spec/default_spec.rb
  2. 6
    0
      templates/default/neutron.conf.erb

+ 7
- 0
spec/default_spec.rb View File

@@ -525,6 +525,13 @@ describe 'openstack-network' do
525 525
             end
526 526
           end
527 527
 
528
+          it 'has default heartbeat options set' do
529
+            [/^heartbeat_timeout_threshold=0$/,
530
+             /^heartbeat_rate=2$/].each do |line|
531
+              expect(chef_run).to render_config_file(file.name).with_section_content('oslo_messaging_rabbit', line)
532
+            end
533
+          end
534
+
528 535
           it 'sets the rabbit_userid attribute' do
529 536
             expect(chef_run).to render_config_file(file.name).with_section_content('oslo_messaging_rabbit', /^rabbit_userid=#{userid}$/)
530 537
           end

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

@@ -389,6 +389,12 @@ qpid_topology_version=<%= node['openstack']['mq']['network']['qpid']['topology_v
389 389
 # From oslo.messaging
390 390
 #
391 391
 
392
+# Number of seconds after which the Rabbit broker is considered down if heartbeat's keep-alive fails (0 disable the heartbeat)
393
+heartbeat_timeout_threshold=<%= node['openstack']['mq']['network']['rabbit']['heartbeat_timeout_threshold'] %>
394
+
395
+# How often times during the heartbeat_timeout_threshold we check the heartbeat
396
+heartbeat_rate=<%= node['openstack']['mq']['network']['rabbit']['heartbeat_rate'] %>
397
+
392 398
 # AMQP queue config options
393 399
 amqp_durable_queues=<%= node['openstack']['mq']['network']['durable_queues'] %>
394 400
 amqp_auto_delete=<%= node['openstack']['mq']['network']['auto_delete'] %>

Loading…
Cancel
Save