From 430f5f746633c7dc0a59e43f32fac2e317881d31 Mon Sep 17 00:00:00 2001 From: Mark Vanderwiel Date: Fri, 5 Jun 2015 14:16:51 -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: I02faeba2c10d9c9b8035819156bfdc0759bafcc6 Partial-Bug: #1462438 --- spec/common_spec.rb | 4 +++- templates/default/ceilometer.conf.erb | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/spec/common_spec.rb b/spec/common_spec.rb index bc8a08b..dfff0b9 100644 --- a/spec/common_spec.rb +++ b/spec/common_spec.rb @@ -94,7 +94,9 @@ describe 'openstack-telemetry::common' do it 'has default RPC/AMQP options set' do [/^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/ceilometer.conf.erb b/templates/default/ceilometer.conf.erb index 9180eab..3a4d44d 100644 --- a/templates/default/ceilometer.conf.erb +++ b/templates/default/ceilometer.conf.erb @@ -105,6 +105,12 @@ qpid_topology_version=<%= node["openstack"]["mq"]["telemetry"]["qpid"]["topology # 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']['telemetry']['rabbit']['heartbeat_timeout_threshold'] %> + +# How often times during the heartbeat_timeout_threshold we check the heartbeat +heartbeat_rate=<%= node['openstack']['mq']['telemetry']['rabbit']['heartbeat_rate'] %> + # Use durable queues in AMQP. (boolean value) amqp_durable_queues=<%= node["openstack"]["mq"]["telemetry"]["durable_queues"] %>