messaging: fix rabbitmq clustering (closes: #4655)

This commit is contained in:
Sebastien Badia
2014-01-09 22:10:31 +01:00
parent 3b18563723
commit 05814d1e87
2 changed files with 9 additions and 5 deletions

View File

@@ -30,13 +30,14 @@
class privatecloud::messaging(
$rabbit_hosts = $os_params::rabbit_hosts,
$rabbit_names = $os_params::rabbit_names,
$rabbit_password = $os_params::rabbit_password
){
class { 'rabbitmq::server':
delete_guest_user => true,
config_cluster => true,
cluster_disk_nodes => $rabbit_hosts,
cluster_disk_nodes => $rabbit_names,
wipe_db_on_cookie_change => true,
}
@@ -44,7 +45,7 @@ class privatecloud::messaging(
provider => 'rabbitmqctl',
require => Class['rabbitmq::server'],
}
rabbitmq_user { ['nova', 'glance', 'neutron', 'cinder', 'ceilometer', 'heat']:
rabbitmq_user { ['nova','glance','neutron','cinder','ceilometer','heat']:
admin => true,
password => $rabbit_password,
provider => 'rabbitmqctl',

View File

@@ -23,15 +23,18 @@ describe 'privatecloud::messaging' do
shared_examples_for 'openstack messaging' do
let :params do
{ :rabbit_hosts => ['10.0.0.1'],
:rabbit_password => 'secrete' }
{
:rabbit_names => ['foo','boo','zoo'],
:rabbit_hosts => ['10.0.0.1','10.0.0.2','10.0.0.3'],
:rabbit_password => 'secrete'
}
end
it 'configure rabbitmq-server' do
should contain_class('rabbitmq::server').with(
:delete_guest_user => true,
:config_cluster => true,
:cluster_disk_nodes => ['10.0.0.1'],
:cluster_disk_nodes => params[:rabbit_names],
:wipe_db_on_cookie_change => true
)
end