Add missing AMQP options to glance-api.conf
Add more AMQP and QPID configuration options to the glance-api configuration file. This enables users to use QPID federation support and also use durable queues for rabbitmq or QPID. Change-Id: I2bdc0f713c7363966a192bfce9b59b3f312532d1
This commit is contained in:
parent
d929f8dfe1
commit
01eb8e9078
|
@ -14,5 +14,5 @@ recipe 'openstack-image::image_upload', 'Upload image using glance im
|
|||
supports os
|
||||
end
|
||||
|
||||
depends 'openstack-common', '~> 9.0'
|
||||
depends 'openstack-common', '~> 9.4'
|
||||
depends 'openstack-identity', '~> 9.0'
|
||||
|
|
|
@ -173,6 +173,13 @@ describe 'openstack-image::api' do
|
|||
node.set['openstack']['image']['notification_driver'] = 'messaging'
|
||||
end
|
||||
|
||||
it 'has RPC/AMQP defaults 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
|
||||
|
||||
context 'rabbitmq' do
|
||||
before do
|
||||
node.set['openstack']['mq']['image']['service_type'] = 'rabbitmq'
|
||||
|
@ -210,7 +217,7 @@ describe 'openstack-image::api' do
|
|||
|
||||
%w(port notification_topic username sasl_mechanisms reconnect reconnect_timeout
|
||||
reconnect_limit reconnect_interval_min reconnect_interval_max reconnect_interval
|
||||
heartbeat protocol tcp_nodelay).each do |attr|
|
||||
heartbeat protocol tcp_nodelay topology_version).each do |attr|
|
||||
it "sets qpid #{attr} attribute" do
|
||||
node.set['openstack']['mq']['image']['qpid'][attr] = "qpid_#{attr}_value"
|
||||
expect(chef_run).to render_file(file.name).with_content(/^qpid_#{attr}\s?=\s?qpid_#{attr}_value$/)
|
||||
|
|
|
@ -106,8 +106,13 @@ registry_client_protocol = http
|
|||
notifier_strategy = default
|
||||
notification_driver = <%= @notification_driver %>
|
||||
|
||||
<% if @notification_driver == "messaging" and @mq_service_type == "rabbitmq" %>
|
||||
#### RABBITMQ #####
|
||||
<% if @notification_driver == "messaging" %>
|
||||
##### AMQP #####
|
||||
amqp_durable_queues=<%= node["openstack"]["mq"]["image"]["durable_queues"] %>
|
||||
amqp_auto_delete=<%= node["openstack"]["mq"]["image"]["auto_delete"] %>
|
||||
|
||||
<% if @mq_service_type == "rabbitmq" %>
|
||||
##### RABBITMQ #####
|
||||
transport_url = rabbit://
|
||||
rabbit_host = <%= node["openstack"]["mq"]["image"]["rabbit"]["host"] %>
|
||||
rabbit_port = <%= node["openstack"]["mq"]["image"]["rabbit"]["port"] %>
|
||||
|
@ -117,15 +122,13 @@ rabbit_password = <%= @mq_password %>
|
|||
rabbit_virtual_host = <%= node["openstack"]["mq"]["image"]["rabbit"]["vhost"] %>
|
||||
rabbit_notification_exchange = glance
|
||||
rabbit_notification_topic = <%= node["openstack"]["mq"]["image"]["rabbit"]["notification_topic"] %>
|
||||
<% elsif @notification_driver == "messaging" and @mq_service_type == "qpid" %>
|
||||
<% elsif @mq_service_type == "qpid" %>
|
||||
##### QPID #####
|
||||
transport_url = qpid://
|
||||
qpid_notification_exchange = glance
|
||||
qpid_notification_topic = <%= node["openstack"]["mq"]["image"]["qpid"]["notification_topic"] %>
|
||||
|
||||
qpid_hostname=<%= node["openstack"]["mq"]["image"]["qpid"]["host"] %>
|
||||
qpid_port=<%= node["openstack"]["mq"]["image"]["qpid"]["port"] %>
|
||||
|
||||
qpid_password=<%= @mq_password %>
|
||||
qpid_username=<%= node["openstack"]["mq"]["image"]["qpid"]["username"] %>
|
||||
qpid_sasl_mechanisms=<%= node["openstack"]["mq"]["image"]["qpid"]["sasl_mechanisms"] %>
|
||||
|
@ -139,6 +142,8 @@ qpid_heartbeat=<%= node["openstack"]["mq"]["image"]["qpid"]["heartbeat"] %>
|
|||
# qpid protocol. default 'tcp'. set to 'ssl' to enable SSL
|
||||
qpid_protocol=<%= node["openstack"]["mq"]["image"]["qpid"]["protocol"] %>
|
||||
qpid_tcp_nodelay=<%= node["openstack"]["mq"]["image"]["qpid"]["tcp_nodelay"] %>
|
||||
qpid_topology_version=<%= node["openstack"]["mq"]["image"]["qpid"]["topology_version"] %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
# ============ Filesystem Store Options ========================
|
||||
|
|
Loading…
Reference in New Issue