From d32e501e3889d20bfceeb9b77554a794b36d8610 Mon Sep 17 00:00:00 2001 From: Ashley Penney Date: Mon, 21 Jul 2014 11:56:40 -0400 Subject: [PATCH] Revert "Set appropriate policy for mirrored queues" --- README.md | 17 ----------------- manifests/init.pp | 2 -- manifests/management.pp | 6 ------ manifests/params.pp | 1 - manifests/policy.pp | 15 --------------- manifests/server.pp | 2 +- 6 files changed, 1 insertion(+), 42 deletions(-) delete mode 100644 manifests/policy.pp diff --git a/README.md b/README.md index d956bdedc..5d0301488 100644 --- a/README.md +++ b/README.md @@ -111,23 +111,6 @@ class { 'rabbitmq': } ``` -**NOTE:** If you are using a version of RabbitMQ less than 3.0, -you still need to use `x-ha-policy: all` in your client -applications for any particular queue to take advantage of H/A via -mirrored queues. - -If you are using a version of RabbitMQ >= 3.0 You should set the -'config_mirrored_queues' parameter if you plan -on using RabbitMQ Mirrored Queues within your cluster: - -```puppet -class { 'rabbitmq': - config_cluster => true, - config_mirrored_queues => true, - cluster_nodes => ['rabbit1', 'rabbit2'], -} -``` - ##Reference ##Classes diff --git a/manifests/init.pp b/manifests/init.pp index c96128a79..27b12f94c 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -6,7 +6,6 @@ $cluster_nodes = $rabbitmq::params::cluster_nodes, $config = $rabbitmq::params::config, $config_cluster = $rabbitmq::params::config_cluster, - $config_mirrored_queues = $rabbitmq::params::config_mirrored_queues, $config_path = $rabbitmq::params::config_path, $config_stomp = $rabbitmq::params::config_stomp, $default_user = $rabbitmq::params::default_user, @@ -70,7 +69,6 @@ validate_string($config) validate_absolute_path($config_path) validate_bool($config_cluster) - validate_bool($config_mirrored_queues) validate_bool($config_stomp) validate_string($default_user) validate_string($default_pass) diff --git a/manifests/management.pp b/manifests/management.pp index 078e9a95f..481a7b4f9 100644 --- a/manifests/management.pp +++ b/manifests/management.pp @@ -10,10 +10,4 @@ } } - if $rabbitmq::config_mirrored_queues { - rabbitmq::policy { 'ha-all': - pattern => '.*', - definition => '{"ha-mode":"all","ha-sync-mode":"automatic"}' - } - } } diff --git a/manifests/params.pp b/manifests/params.pp index 63e2e491e..2592aca32 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -61,7 +61,6 @@ $cluster_nodes = [] $config = 'rabbitmq/rabbitmq.config.erb' $config_cluster = false - $config_mirrored_queues = false $config_path = '/etc/rabbitmq/rabbitmq.config' $config_stomp = false $default_user = 'guest' diff --git a/manifests/policy.pp b/manifests/policy.pp deleted file mode 100644 index 204fb36a9..000000000 --- a/manifests/policy.pp +++ /dev/null @@ -1,15 +0,0 @@ -define rabbitmq::policy ( - $pattern, - $definition, - $vhost = '/', - $priority = 0, -) { - - exec { "rabbitmq policy: ${title}": - command => "rabbitmqctl set_policy -p ${vhost} '${name}' '${pattern}' '${definition}' ${priority}", - unless => "rabbitmqctl list_policies | grep -qE '^${vhost}\\s+${name}\\s+${pattern}\\s+${definition}\\s+${priority}$'", - path => ['/bin','/sbin','/usr/bin','/usr/sbin'], - require => Class['rabbitmq::service'], - before => Anchor['rabbitmq::end'] - } -} diff --git a/manifests/server.pp b/manifests/server.pp index 8ad26cb5b..495ea2f2d 100644 --- a/manifests/server.pp +++ b/manifests/server.pp @@ -66,7 +66,7 @@ } if $config_mirrored_queues != undef { - warning('The $config_mirrored_queues parameter is deprecated in this class, use the rabbitmq class') + warning('The $config_mirrored_queues parameter is deprecated; it does not affect anything') } anchor {'before::rabbimq::class':