diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 19f558b..b9bcaf3 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -404,6 +404,17 @@ shared_examples 'expects to create heat conf' do node.set['openstack']['mq']['orchestration']['service_type'] = 'rabbitmq' end + it 'has default rabbit values' do + [/^rpc_conn_pool_size=30$/, + /^amqp_durable_queues=false$/, + /^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 + it 'does not have rabbit ha values' do [ /^rabbit_host=127.0.0.1$/, diff --git a/templates/default/heat.conf.erb b/templates/default/heat.conf.erb index f86fffa..0176617 100644 --- a/templates/default/heat.conf.erb +++ b/templates/default/heat.conf.erb @@ -1345,6 +1345,12 @@ qpid_reconnect_interval=<%= node["openstack"]["mq"]["orchestration"]["qpid"]["re <% if @mq_service_type == "rabbitmq" %> [oslo_messaging_rabbit] +# 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']['orchestration']['rabbit']['heartbeat_timeout_threshold'] %> + +# How often times during the heartbeat_timeout_threshold we check the heartbeat +heartbeat_rate=<%= node['openstack']['mq']['orchestration']['rabbit']['heartbeat_rate'] %> + # Use durable queues in amqp. (boolean value) # Deprecated group/name - [DEFAULT]/rabbit_durable_queues amqp_durable_queues=<%= node['openstack']['mq']['orchestration']['durable_queues'] %>