From 39f88a3e48a011df43dc795cd02a3cc6dae196a7 Mon Sep 17 00:00:00 2001 From: Mark Vanderwiel Date: Fri, 5 Jun 2015 11:52:12 -0500 Subject: [PATCH] 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: Ibe089a1d2e298f703d3cc6c952e475f5c1990880 Partial-Bug: #1462438 --- spec/ironic-common_spec.rb | 4 +++- templates/default/ironic.conf.erb | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/spec/ironic-common_spec.rb b/spec/ironic-common_spec.rb index 82a7055..83299ee 100644 --- a/spec/ironic-common_spec.rb +++ b/spec/ironic-common_spec.rb @@ -179,7 +179,9 @@ describe 'openstack-bare-metal::ironic-common' do it 'has default RPC/AMQP options set' do [/^rpc_conn_pool_size=30$/, /^amqp_durable_queues=false$/, - /^amqp_auto_delete=false$/].each do |line| + /^amqp_auto_delete=false$/, + /^heartbeat_timeout_threshold=0$/, + /^heartbeat_rate=2$/].each do |line| expect(chef_run).to render_config_file(file.name).with_section_content('oslo_messaging_rabbit', line) end end diff --git a/templates/default/ironic.conf.erb b/templates/default/ironic.conf.erb index 5bf14d3..c307b9a 100644 --- a/templates/default/ironic.conf.erb +++ b/templates/default/ironic.conf.erb @@ -1132,6 +1132,12 @@ qpid_topology_version=<%= node['openstack']['mq']['bare-metal']['qpid']['topolog # From oslo.messaging # +# Number of seconds after which the Rabbit broker is considered down if heartbeat's keep-alive fails (0 disable the heartbeat) +heartbeat_timeout_threshold=<%= node['openstack']['mq']['bare-metal']['rabbit']['heartbeat_timeout_threshold'] %> + +# How often times during the heartbeat_timeout_threshold we check the heartbeat +heartbeat_rate=<%= node['openstack']['mq']['bare-metal']['rabbit']['heartbeat_rate'] %> + # Use durable queues in AMQP. (boolean value) # Deprecated group/name - [DEFAULT]/rabbit_durable_queues amqp_durable_queues=<%= node['openstack']['mq']['bare-metal']['durable_queues'] %>