From 5dbb553d9357c036bfe575a920872391868bf1ca Mon Sep 17 00:00:00 2001 From: danehans Date: Tue, 2 Jul 2013 19:04:13 +0000 Subject: [PATCH] Add support for RabbitMQ Mirrored Queues. Previously, the openstack::quantum class could only have a single rabbit broker by using the rabbit_host parameter. This patch allows users to specify an array of rabbitmq brokers by introducing the rabbit_hosts parameter to leverage Rabbit Mirrored Queues (rabbit_ha_queues). Defaults to false for backwards compatability and to not implement rabbit_ha_queues. Change-Id: I24f8dadde3324e589ae38603d85acd61ccf4d911 --- manifests/quantum.pp | 7 +++++++ spec/classes/openstack_quantum_spec.rb | 1 + 2 files changed, 8 insertions(+) diff --git a/manifests/quantum.pp b/manifests/quantum.pp index 4d2fa7d..5dba9dc 100644 --- a/manifests/quantum.pp +++ b/manifests/quantum.pp @@ -86,6 +86,11 @@ # Host where rabbitmq is running. # (optional) 127.0.0.1 # +# [rabbit_hosts] +# Enable/disable Qauntum to use rabbitmq mirrored queues. +# Specifies an array of clustered rabbitmq brokers. +# (optional) false +# # [rabbit_virtual_host] # Virtual host to use for rabbitmq. # (optional) Defaults to '/'. @@ -159,6 +164,7 @@ class openstack::quantum ( # Rabbit Information $rabbit_user = 'rabbit_user', $rabbit_host = '127.0.0.1', + $rabbit_hosts = false, $rabbit_virtual_host = '/', # Database. Currently mysql is the only option. $db_type = 'mysql', @@ -177,6 +183,7 @@ class openstack::quantum ( enabled => $enabled, bind_host => $bind_address, rabbit_host => $rabbit_host, + rabbit_hosts => $rabbit_hosts, rabbit_virtual_host => $rabbit_virtual_host, rabbit_user => $rabbit_user, rabbit_password => $rabbit_password, diff --git a/spec/classes/openstack_quantum_spec.rb b/spec/classes/openstack_quantum_spec.rb index 6ee8b0a..1b1ffbf 100644 --- a/spec/classes/openstack_quantum_spec.rb +++ b/spec/classes/openstack_quantum_spec.rb @@ -30,6 +30,7 @@ describe 'openstack::quantum' do :enabled => true, :bind_host => '0.0.0.0', :rabbit_host => '127.0.0.1', + :rabbit_hosts => false, :rabbit_virtual_host => '/', :rabbit_user => 'rabbit_user', :rabbit_password => 'rabbit_pass',