From 545094e3be6d592ff9460d7fbf191632cdd98167 Mon Sep 17 00:00:00 2001 From: Matt Odden Date: Tue, 27 May 2014 23:24:27 +0000 Subject: [PATCH] Add missing AMQP options to neutron.conf Using the new attributes added in common, we can allow deployers to optionally turn on durable queues, auto-delete for queues, and enabled QPID federation support. Bump common dependency version, since we need the attributes introduced in 9.4 Depends on change I850c01a40aab02cf4531f7983543ef89e0e60446 Change-Id: I24c70dbcaedbe8db68286f6107ddce36da80d5d8 --- metadata.rb | 2 +- spec/server_spec.rb | 12 ++++++++++++ templates/default/neutron.conf.erb | 6 ++++-- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/metadata.rb b/metadata.rb index 70659f70..806810c7 100644 --- a/metadata.rb +++ b/metadata.rb @@ -17,4 +17,4 @@ recipe 'openstack-network::identity_registration', 'Registers OpenSta end depends 'openstack-identity', '~> 9.0' -depends 'openstack-common', '~> 9.0' +depends 'openstack-common', '~> 9.4' diff --git a/spec/server_spec.rb b/spec/server_spec.rb index ab63213f..26a46056 100644 --- a/spec/server_spec.rb +++ b/spec/server_spec.rb @@ -112,6 +112,13 @@ describe 'openstack-network::server' do /^control_exchange = neutron$/) end + it 'has default amqp_* queue options set' do + [/^amqp_durable_queues=false$/, + /^amqp_auto_delete=false$/].each do |line| + expect(chef_run).to render_file(file.name).with_content(line) + end + end + it 'it sets agent_down_time correctly' do expect(chef_run).to render_file(file.name).with_content( 'agent_down_time = 75') @@ -405,6 +412,11 @@ describe 'openstack-network::server' do expect(chef_run).to render_file(file.name).with_content( 'qpid_tcp_nodelay=true') end + + it 'has qpid_topology_version set' do + expect(chef_run).to render_file(file.name).with_content( + /^qpid_topology_version=1$/) + end end describe 'neutron.conf with rabbit ha' do diff --git a/templates/default/neutron.conf.erb b/templates/default/neutron.conf.erb index 5e9036ed..475a8c1a 100644 --- a/templates/default/neutron.conf.erb +++ b/templates/default/neutron.conf.erb @@ -113,6 +113,9 @@ rpc_response_timeout = <%= node['openstack']['network']['rpc_response_timeout'] # allowed_rpc_exception_modules = neutron.openstack.common.exception, nova.exception # AMQP exchange to connect to if using RabbitMQ or QPID control_exchange = <%= node["openstack"]["network"]["control_exchange"] %> +# AMQP queue config options +amqp_durable_queues=<%= node['openstack']['mq']['network']['durable_queues'] %> +amqp_auto_delete=<%= node['openstack']['mq']['network']['auto_delete'] %> # Configuration options if sending notifications via kombu rpc (these are # the defaults) @@ -155,7 +158,6 @@ rabbit_port=<%= node["openstack"]["mq"]["network"]["rabbit"]["port"] %> rpc_backend=neutron.openstack.common.rpc.impl_qpid qpid_hostname=<%= node["openstack"]["mq"]["network"]["qpid"]["host"] %> qpid_port=<%= node["openstack"]["mq"]["network"]["qpid"]["port"] %> - qpid_password=<%= @mq_password %> qpid_username=<%= node["openstack"]["mq"]["network"]["qpid"]["username"] %> qpid_sasl_mechanisms=<%= node["openstack"]["mq"]["network"]["qpid"]["sasl_mechanisms"] %> @@ -169,7 +171,7 @@ qpid_heartbeat=<%= node["openstack"]["mq"]["network"]["qpid"]["heartbeat"] %> # qpid protocol. default 'tcp'. set to 'ssl' to enable SSL qpid_protocol=<%= node["openstack"]["mq"]["network"]["qpid"]["protocol"] %> qpid_tcp_nodelay=<%= node["openstack"]["mq"]["network"]["qpid"]["tcp_nodelay"] %> - +qpid_topology_version=<%= node['openstack']['mq']['network']['qpid']['topology_version'] %> <% end %> # ZMQ