diff --git a/metadata.rb b/metadata.rb index 8504143..ad739ce 100644 --- a/metadata.rb +++ b/metadata.rb @@ -19,7 +19,7 @@ recipe 'openstack-block-storage::volume', 'Installs the cinder-volume end depends 'apt', '>= 2.3.8' -depends 'openstack-common', '~> 9.0' +depends 'openstack-common', '~> 9.4' depends 'openstack-identity', '~> 9.0' depends 'openstack-image', '~> 9.0' depends 'selinux', '>= 0.7.2' diff --git a/spec/cinder_common_spec.rb b/spec/cinder_common_spec.rb index 28de9b7..ead5996 100644 --- a/spec/cinder_common_spec.rb +++ b/spec/cinder_common_spec.rb @@ -60,12 +60,11 @@ describe 'openstack-block-storage::cinder-common' do .and_return(test_pass) end - context 'commonly named attributes' do + context 'commonly named attributes' do %w(debug verbose lock_path notification_driver storage_availability_zone quota_volumes quota_gigabytes quota_driver volume_name_template snapshot_name_template - control_exchange rpc_thread_pool_size rpc_conn_pool_size - rpc_response_timeout max_gigabytes).each do |attr_key| + control_exchange max_gigabytes).each do |attr_key| it "has a #{attr_key} attribute" do node.set['openstack']['block-storage'][attr_key] = "#{attr_key}_value" @@ -160,6 +159,17 @@ describe 'openstack-block-storage::cinder-common' do expect(chef_run).to render_file(file.name).with_content(/^rpc_backend=rpc_backend_value$/) end + it 'has default RPC/AMQP options set' do + [/^rpc_backend=cinder.openstack.common.rpc.impl_kombu$/, + /^rpc_thread_pool_size=64$/, + /^rpc_conn_pool_size=30$/, + /^rpc_response_timeout=60$/, + /^amqp_durable_queues=false$/, + /^amqp_auto_delete=false$/].each do |line| + expect(chef_run).to render_file(file.name).with_content(line) + end + end + context 'rabbitmq as mq service' do before do node.set['openstack']['mq']['block-storage']['service_type'] = 'rabbitmq' @@ -241,6 +251,10 @@ describe 'openstack-block-storage::cinder-common' do expect(chef_run).to render_file(file.name).with_content(/^qpid_password=#{test_pass}$/) end + it 'has default qpid topology version' do + expect(chef_run).to render_file(file.name).with_content(/^qpid_topology_version=1$/) + end + it 'has qpid notification_topics' do node.set['openstack']['mq']['block-storage']['qpid']['notification_topic'] = 'qpid_notification_topic_value' expect(chef_run).to render_file(file.name).with_content(/^notification_topics=qpid_notification_topic_value$/) diff --git a/templates/default/cinder.conf.erb b/templates/default/cinder.conf.erb index 01ca013..c3e0e67 100644 --- a/templates/default/cinder.conf.erb +++ b/templates/default/cinder.conf.erb @@ -349,6 +349,9 @@ rpc_response_timeout=<%= node["openstack"]["block-storage"]["rpc_response_timeou #### (ListOpt) Modules of exceptions that are permitted to be recreatedupon #### receiving exception data from an rpc call. +# 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'] %> <% if @mq_service_type == "rabbitmq" %> @@ -462,6 +465,9 @@ qpid_protocol=<%= node["openstack"]["mq"]["block-storage"]["qpid"]["protocol"] % qpid_tcp_nodelay=<%= node["openstack"]["mq"]["block-storage"]["qpid"]["tcp_nodelay"] %> #### (BoolOpt) Disable Nagle algorithm +qpid_topology_version=<%= node['openstack']['mq']['block-storage']['qpid']['topology_version'] %> +#### (IntOpt) See oslo/messaging/_drivers/impl_qpid.py for details + notification_topics=<%= node["openstack"]["mq"]["block-storage"]["qpid"]["notification_topic"] %> #### (ListOpt) AMQP topic used for openstack notifications <% end %>