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: If21b39cb0c640fea0846f448100842374f97f550
Partial-Bug: #1462438
tags/kilo-eol
Mark Vanderwiel 4 years ago
parent
commit
9cc96cd64e
2 changed files with 9 additions and 1 deletions
  1. 3
    1
      spec/cinder_common_spec.rb
  2. 6
    0
      templates/default/cinder.conf.erb

+ 3
- 1
spec/cinder_common_spec.rb View File

@@ -370,7 +370,9 @@ describe 'openstack-block-storage::cinder-common' do
370 370
           it 'has default RPC/AMQP options set' do
371 371
             [/^rpc_conn_pool_size=30$/,
372 372
              /^amqp_durable_queues=false$/,
373
-             /^amqp_auto_delete=false$/].each do |line|
373
+             /^amqp_auto_delete=false$/,
374
+             /^heartbeat_timeout_threshold=0$/,
375
+             /^heartbeat_rate=2$/].each do |line|
374 376
               expect(chef_run).to render_config_file(file.name).with_section_content('oslo_messaging_rabbit', line)
375 377
             end
376 378
           end

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

@@ -1265,6 +1265,12 @@ notification_topics=<%= node["openstack"]["mq"]["block-storage"]["qpid"]["notifi
1265 1265
 # From oslo.messaging
1266 1266
 #
1267 1267
 
1268
+# Number of seconds after which the Rabbit broker is considered down if heartbeat's keep-alive fails (0 disable the heartbeat)
1269
+heartbeat_timeout_threshold=<%= node['openstack']['mq']['block-storage']['rabbit']['heartbeat_timeout_threshold'] %>
1270
+
1271
+# How often times during the heartbeat_timeout_threshold we check the heartbeat
1272
+heartbeat_rate=<%= node['openstack']['mq']['block-storage']['rabbit']['heartbeat_rate'] %>
1273
+
1268 1274
 # from oslo/messaging/_drivers/amqp.py
1269 1275
 amqp_durable_queues=<%= node['openstack']['mq']['block-storage']['durable_queues'] %>
1270 1276
 amqp_auto_delete=<%= node['openstack']['mq']['block-storage']['auto_delete'] %>

Loading…
Cancel
Save