From 9cc96cd64e752f9df41cab21b727c7ab3a860877 Mon Sep 17 00:00:00 2001 From: Mark Vanderwiel Date: Fri, 5 Jun 2015 11:55:26 -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: If21b39cb0c640fea0846f448100842374f97f550 Partial-Bug: #1462438 --- spec/cinder_common_spec.rb | 4 +++- templates/default/cinder.conf.erb | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/spec/cinder_common_spec.rb b/spec/cinder_common_spec.rb index c935b3c..45742c0 100644 --- a/spec/cinder_common_spec.rb +++ b/spec/cinder_common_spec.rb @@ -370,7 +370,9 @@ describe 'openstack-block-storage::cinder-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/cinder.conf.erb b/templates/default/cinder.conf.erb index f025949..d334d41 100644 --- a/templates/default/cinder.conf.erb +++ b/templates/default/cinder.conf.erb @@ -1265,6 +1265,12 @@ notification_topics=<%= node["openstack"]["mq"]["block-storage"]["qpid"]["notifi # 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']['block-storage']['rabbit']['heartbeat_timeout_threshold'] %> + +# How often times during the heartbeat_timeout_threshold we check the heartbeat +heartbeat_rate=<%= node['openstack']['mq']['block-storage']['rabbit']['heartbeat_rate'] %> + # from oslo/messaging/_drivers/amqp.py amqp_durable_queues=<%= node['openstack']['mq']['block-storage']['durable_queues'] %> amqp_auto_delete=<%= node['openstack']['mq']['block-storage']['auto_delete'] %>