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: I41b3fc4699a4f285e9fcb066da55bb8a7f1361a2
Partial-Bug: #1462438
tags/kilo-eol
Mark Vanderwiel 4 years ago
parent
commit
2f6516755a

+ 3
- 1
spec/spec_helper.rb View File

@@ -239,7 +239,9 @@ shared_examples 'messaging' do
239 239
 
240 240
     it 'has RPC/AMQP defaults set' do
241 241
       [/^amqp_durable_queues=false$/,
242
-       /^amqp_auto_delete=false$/].each do |line|
242
+       /^amqp_auto_delete=false$/,
243
+       /^heartbeat_timeout_threshold=0$/,
244
+       /^heartbeat_rate=2$/].each do |line|
243 245
         expect(chef_run).to render_file(file_name).with_content(line)
244 246
       end
245 247
     end

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

@@ -783,6 +783,12 @@ qpid_topology_version=<%= node["openstack"]["mq"]["image"]["qpid"]["topology_ver
783 783
 
784 784
 <% if @notification_driver == "messaging" && @mq_service_type == "rabbitmq" %>
785 785
 
786
+# Number of seconds after which the Rabbit broker is considered down if heartbeat's keep-alive fails (0 disable the heartbeat)
787
+heartbeat_timeout_threshold=<%= node['openstack']['mq']['image']['rabbit']['heartbeat_timeout_threshold'] %>
788
+
789
+# How often times during the heartbeat_timeout_threshold we check the heartbeat
790
+heartbeat_rate=<%= node['openstack']['mq']['image']['rabbit']['heartbeat_rate'] %>
791
+
786 792
 # Use durable queues in AMQP. (boolean value)
787 793
 # Deprecated group/name - [DEFAULT]/rabbit_durable_queues
788 794
 amqp_durable_queues=<%= node["openstack"]["mq"]["image"]["durable_queues"] %>

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

@@ -316,6 +316,12 @@ qpid_topology_version=<%= node["openstack"]["mq"]["image"]["qpid"]["topology_ver
316 316
 
317 317
 <% if @notification_driver == "messaging" && @mq_service_type == "rabbitmq" %>
318 318
 
319
+# Number of seconds after which the Rabbit broker is considered down if heartbeat's keep-alive fails (0 disable the heartbeat)
320
+heartbeat_timeout_threshold=<%= node['openstack']['mq']['image']['rabbit']['heartbeat_timeout_threshold'] %>
321
+
322
+# How often times during the heartbeat_timeout_threshold we check the heartbeat
323
+heartbeat_rate=<%= node['openstack']['mq']['image']['rabbit']['heartbeat_rate'] %>
324
+
319 325
 # Use durable queues in AMQP. (boolean value)
320 326
 # Deprecated group/name - [DEFAULT]/rabbit_durable_queues
321 327
 amqp_durable_queues=<%= node["openstack"]["mq"]["image"]["durable_queues"] %>

Loading…
Cancel
Save