Giter Club home page Giter Club logo

puppet-rabbitmq's Introduction

rabbitmq

License Build Status Code Coverage Puppet Forge Puppet Forge - downloads Puppet Forge - endorsement Puppet Forge - scores

Table of Contents

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Setup - The basics of getting started with rabbitmq
  4. Usage - Configuration options and additional functionality
  5. Reference - An under-the-hood peek at what the module is doing and how
  6. Limitations - OS compatibility, etc.
  7. Development - Guide for contributing to the module

Overview

This module manages RabbitMQ (www.rabbitmq.com)

Module Description

The rabbitmq module sets up rabbitmq and has a number of providers to manage everything from vhosts to exchanges after setup.

This module has been tested against 3.5.x and 3.6.x (as well as earlier versions) and is known to not support all features against versions prior to 2.7.1.

Setup

What rabbitmq affects

  • rabbitmq repository files.
  • rabbitmq package.
  • rabbitmq configuration file.
  • rabbitmq service.

Usage

All options and configuration can be done through interacting with the parameters on the main rabbitmq class. These are now documented via Puppet Strings

You can view example usage in REFERENCE.

Reference

See REFERENCE.

Development

This module is maintained by Vox Pupuli. Voxpupuli welcomes new contributions to this module, especially those that include documentation and rspec tests. We are happy to provide guidance if necessary.

Please see CONTRIBUTING for more details.

Authors

puppet-rabbitmq's People

Contributors

alexjfisher avatar apenney avatar bastelfreak avatar bmjen avatar bodepd avatar buzzdeee avatar cmurphy avatar danielgadd avatar davids avatar dhollinger avatar dhoppe avatar ekohl avatar emilienm avatar eputnam avatar fatmcgav avatar hunner avatar ironpinguin avatar jayh5 avatar jeckersb avatar jimmybigcommerce avatar jmchilton avatar jonnytdevops avatar nanliu avatar nibalizer avatar queeno avatar raphink avatar robocoder avatar smortex avatar tphoney avatar wyardley avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

puppet-rabbitmq's Issues

add vars to manage management ssl certs separately.

Add some new vars to specify the management ssl certs separately
Then just default the vars to the current ssl_key/cacert/cert options
e.g
{cacertfile, "<%= @management_ssl_cacert %>"},
<%- end -%>
{certfile, "<%= @management_ssl_cert %>"},
{keyfile, "<%= @management_ssl_key %>"}

wipe_db_on_cookie_change deletes all data every puppet run

When using wipe_db_on_cookie_change, even if the cookie hasn't changed, every 30 minutes Puppet runs the exec wipe_db and all my data is lost.

 class { 'rabbitmq':
   version                  => "${rabbitmq_version}",
   config_cluster           => true,
   cluster_nodes            => [ "${rabbitmq_node1}", "${rabbitmq_node2}" ],
   cluster_node_type        => 'disc',
   erlang_cookie            => "${erlang_cookie}",
   wipe_db_on_cookie_change => true,
}

SSL error to get rabbitmq keys

I'm using Ubuntu 16.04 installed from netboot. Applying the manifest below

class { '::rabbitmq':
    cluster_nodes                        => $cluster_nodes,
    config_cluster                        => $real_config_cluster,
    erlang_cookie                        => $erlang_cookie,
    cluster_node_type                 => 'ram',
    delete_guest_user                 => true,
    wipe_db_on_cookie_change => true
  }

I don't know why, but my nodes can't add the apt key from rabbitmq

Jul 19 18:11:21  puppet-agent[23860]: Could not set 'present' on ensure: SSL_connect returned=1 errno=0 state=error: certificate verify failed at /etc/puppetlabs/code/environments/production/modules/apt/manifests/key.pp:77
Jul 19 18:11:21  puppet-agent[23860]: Could not set 'present' on ensure: SSL_connect returned=1 errno=0 state=error: certificate verify failed at /etc/puppetlabs/code/environments/production/modules/apt/manifests/key.pp:77
Jul 19 18:11:21  puppet-agent[23860]: Wrapped exception:
Jul 19 18:11:21  puppet-agent[23860]: SSL_connect returned=1 errno=0 state=error: certificate verify failed
Jul 19 18:11:21  puppet-agent[23860]: (/Stage[main]/Rabbitmq::Repo::Apt/Apt::Source[rabbitmq]/Apt::Key[Add key: 0A9AF2115F4687BD29803A206B73A36E6026DFCA from Apt::Source rabbitmq]/Apt_key[Add key: 0A9AF2115F4687BD29803A206B73A36E6026DFCA from Apt::Source rabbitmq]/ensure) change from absent to present failed: Could not set 'present' on ensure: SSL_connect returned=1 errno=0 state=error: certificate verify failed at /etc/puppetlabs/code/environments/production/modules/apt/manifests/key.pp:77

If I change https to http on key_source on manifests/repo/apt.pp, everything runs fine. I don't know if is my server issue or repository issue.

exchanges will be recreated in every puppet run if the vhost is not /

self.instances is executing rabbitmqadmin list exchanges, which uses / by default. If the exchanges are created using another vhost then they won't be included in @property_hash, making the exists method return an incorrect value.

I have created a patch for this which uses rabbitmqctl instead to populate @property_hash (I think that rabbitmqadmin would need the username and password) and it seems to work.

'provider rabbitmqplugins not functional on this host'

Problem:

Trying to install a rabbitmq server, most basic variant possible.

What I do:

include ::rabbitmq

Expected Result

RabbitMQ (+ erlang installs), rabbitmq-server is started, starts listening to the amqp port.

Actual Result

Error: /Stage[main]/Rabbitmq/Rabbitmq_plugin[rabbitmq_management]: Provider rabbitmqplugins is not functional on this host
Warning: /Stage[main]/Rabbitmq::Service/Service[rabbitmq-server]: Skipping because of failed dependencies
Warning: /Stage[main]/Rabbitmq::Install::Rabbitmqadmin/Exec[Download rabbitmqadmin]: Skipping because of failed dependencies
Warning: /Stage[main]/Rabbitmq::Install::Rabbitmqadmin/File[/usr/local/bin/rabbitmqadmin]: Skipping because of failed dependencies
Warning: /Stage[main]/Rabbitmq/Anchor[rabbitmq::end]: Skipping because of failed dependencies

Environment

OS: CentOS 6.4 x86_64
Hypervisor: virtualbox

(::epel is included.)

Misc Info

$ rabbitmq-plugin => command not found

With this there's no problem:

rabbitmq::admin_enable:
  false

rabbitmq should not install the latest version by default

Currently, the rabbitmq module always adds rabbitmq repos from upstream. This means that the module will always install the latest version of the rabbitmq.

This is problematic for the following reasons:

  • This will cause the module to not work at times (when a new major version is released).
  • It does not allow users of this module to use the version of rabbitmq provided by their distro (in fact, it is not even possible to configure this module to not use the latest version)

Doesn't require curl, fails when it isn't installed

Unfortunately, on Ubuntu 12.04, curl isn't installed by default. When I try installing this module, it fails because it can't download something with curl. Maybe just adding curl as a required package would fix the problem?

option to ignore the repo part

Hi,
can you add a parameter to ignore the repo part ? then i will be able to define the repo that i want and install the version that want
thanks

Rabbitmq_exchange resource produces errors

root@puppet:/etc/puppet# puppet resource rabbitmq_exchange
Error: Could not run: Execution of '/usr/local/bin/rabbitmqadmin list exchanges' returned 1: Traceback (most recent call last):
File "/usr/local/bin/rabbitmqadmin", line 939, in
main()
File "/usr/local/bin/rabbitmqadmin", line 370, in main
(options, args) = make_configuration()
File "/usr/local/bin/rabbitmqadmin", line 319, in make_configuration
config_file = default_config()
File "/usr/local/bin/rabbitmqadmin", line 310, in default_config
return home + os.sep + ".rabbitmqadmin.conf"
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

This is with 3.1.0, and a 3.3.2 of puppet. It's also produced by the mcollective module, when it tries to add exchanges.

I suspect that it's having a problem parsing the output of the command. Rabbit version 3.2.1

I'm going to go looking at the code now.

Enabling new plugin fails

When i try to enable a extra plugin, the plugin is enabled bot not running.

When executing the command that the provider uses (/usr/lib/rabbitmq/bin/rabbitmq-plugins) manually an error shows up

[root@rmq ~]# rabbitmq-plugins list
 Configured: E = explicitly enabled; e = implicitly enabled
 | Status:   * = running on rabbit@rmq
 |/
[e*] amqp_client                       3.6.5
[  ] cowboy                            1.0.3
[  ] cowlib                            1.0.1
[e*] mochiweb                          2.13.1
[  ] rabbitmq_amqp1_0                  3.6.5
[  ] rabbitmq_auth_backend_ldap        3.6.5
[  ] rabbitmq_auth_mechanism_ssl       3.6.5
[  ] rabbitmq_consistent_hash_exchange 3.6.5
[  ] rabbitmq_event_exchange           3.6.5
[  ] rabbitmq_federation               3.6.5
[  ] rabbitmq_federation_management    3.6.5
[  ] rabbitmq_jms_topic_exchange       3.6.5
[E*] rabbitmq_management               3.6.5
[e*] rabbitmq_management_agent         3.6.5
[  ] rabbitmq_management_visualiser    3.6.5
[  ] rabbitmq_mqtt                     3.6.5
[  ] rabbitmq_recent_history_exchange  1.2.1
[  ] rabbitmq_sharding                 0.1.0
[  ] rabbitmq_shovel                   3.6.5
[  ] rabbitmq_shovel_management        3.6.5
[  ] rabbitmq_stomp                    3.6.5
[  ] rabbitmq_top                      3.6.5
[  ] rabbitmq_tracing                  3.6.5
[  ] rabbitmq_trust_store              3.6.5
[e*] rabbitmq_web_dispatch             3.6.5
[  ] rabbitmq_web_stomp                3.6.5
[  ] rabbitmq_web_stomp_examples       3.6.5
[  ] sockjs                            0.3.4
[e*] webmachine                        1.10.3
[root@rmq ~]# /usr/lib/rabbitmq/bin/rabbitmq-plugins enable rabbitmq_web_stomp
The following plugins have been enabled:
  rabbitmq_stomp
  cowlib
  cowboy
  sockjs
  rabbitmq_web_stomp

Applying plugin configuration to rabbit@rmq... failed.
 * Could not contact node rabbit@rmq.
   Changes will take effect at broker restart.
 * Options: --online  - fail if broker cannot be contacted.
            --offline - do not try to contact broker.
[root@rmq ~]# /usr/lib/rabbitmq/bin/rabbitmq-plugins list
 Configured: E = explicitly enabled; e = implicitly enabled
 | Status:   [failed to contact rabbit@rmq - status not shown]
 |/
[e ] amqp_client                       3.6.5
[e ] cowboy                            1.0.3
[e ] cowlib                            1.0.1
[e ] mochiweb                          2.13.1
[  ] rabbitmq_amqp1_0                  3.6.5
[  ] rabbitmq_auth_backend_ldap        3.6.5
[  ] rabbitmq_auth_mechanism_ssl       3.6.5
[  ] rabbitmq_consistent_hash_exchange 3.6.5
[  ] rabbitmq_event_exchange           3.6.5
[  ] rabbitmq_federation               3.6.5
[  ] rabbitmq_federation_management    3.6.5
[  ] rabbitmq_jms_topic_exchange       3.6.5
[E ] rabbitmq_management               3.6.5
[e ] rabbitmq_management_agent         3.6.5
[  ] rabbitmq_management_visualiser    3.6.5
[  ] rabbitmq_mqtt                     3.6.5
[  ] rabbitmq_recent_history_exchange  1.2.1
[  ] rabbitmq_sharding                 0.1.0
[  ] rabbitmq_shovel                   3.6.5
[  ] rabbitmq_shovel_management        3.6.5
[e ] rabbitmq_stomp                    3.6.5
[  ] rabbitmq_top                      3.6.5
[  ] rabbitmq_tracing                  3.6.5
[  ] rabbitmq_trust_store              3.6.5
[e ] rabbitmq_web_dispatch             3.6.5
[E ] rabbitmq_web_stomp                3.6.5
[  ] rabbitmq_web_stomp_examples       3.6.5
[e ] sockjs                            0.3.4
[e ] webmachine                        1.10.3
[root@rmq ~]#

The start the plugin i must restart the rabbitmq-server service

When i execute the command that's shown on the site of rabbitmq (rabbitmq-plugins) to enable a plugin the command succeeds and the the plugin is enabled and running without restarting the rabbitmq-server service

[root@rmq ~]# rabbitmq-plugins list
 Configured: E = explicitly enabled; e = implicitly enabled
 | Status:   * = running on rabbit@rmq
 |/
[e*] amqp_client                       3.6.5
[  ] cowboy                            1.0.3
[  ] cowlib                            1.0.1
[e*] mochiweb                          2.13.1
[  ] rabbitmq_amqp1_0                  3.6.5
[  ] rabbitmq_auth_backend_ldap        3.6.5
[  ] rabbitmq_auth_mechanism_ssl       3.6.5
[  ] rabbitmq_consistent_hash_exchange 3.6.5
[  ] rabbitmq_event_exchange           3.6.5
[  ] rabbitmq_federation               3.6.5
[  ] rabbitmq_federation_management    3.6.5
[  ] rabbitmq_jms_topic_exchange       3.6.5
[E*] rabbitmq_management               3.6.5
[e*] rabbitmq_management_agent         3.6.5
[  ] rabbitmq_management_visualiser    3.6.5
[  ] rabbitmq_mqtt                     3.6.5
[  ] rabbitmq_recent_history_exchange  1.2.1
[  ] rabbitmq_sharding                 0.1.0
[  ] rabbitmq_shovel                   3.6.5
[  ] rabbitmq_shovel_management        3.6.5
[  ] rabbitmq_stomp                    3.6.5
[  ] rabbitmq_top                      3.6.5
[  ] rabbitmq_tracing                  3.6.5
[  ] rabbitmq_trust_store              3.6.5
[e*] rabbitmq_web_dispatch             3.6.5
[  ] rabbitmq_web_stomp                3.6.5
[  ] rabbitmq_web_stomp_examples       3.6.5
[  ] sockjs                            0.3.4
[e*] webmachine                        1.10.3
[root@rmq ~]# rabbitmq-plugins enable rabbitmq_web_stomp
The following plugins have been enabled:
  rabbitmq_stomp
  cowlib
  cowboy
  sockjs
  rabbitmq_web_stomp

Applying plugin configuration to rabbit@rmq... started 5 plugins.
[root@rmq ~]# rabbitmq-plugins list
 Configured: E = explicitly enabled; e = implicitly enabled
 | Status:   * = running on rabbit@rmq
 |/
[e*] amqp_client                       3.6.5
[e*] cowboy                            1.0.3
[e*] cowlib                            1.0.1
[e*] mochiweb                          2.13.1
[  ] rabbitmq_amqp1_0                  3.6.5
[  ] rabbitmq_auth_backend_ldap        3.6.5
[  ] rabbitmq_auth_mechanism_ssl       3.6.5
[  ] rabbitmq_consistent_hash_exchange 3.6.5
[  ] rabbitmq_event_exchange           3.6.5
[  ] rabbitmq_federation               3.6.5
[  ] rabbitmq_federation_management    3.6.5
[  ] rabbitmq_jms_topic_exchange       3.6.5
[E*] rabbitmq_management               3.6.5
[e*] rabbitmq_management_agent         3.6.5
[  ] rabbitmq_management_visualiser    3.6.5
[  ] rabbitmq_mqtt                     3.6.5
[  ] rabbitmq_recent_history_exchange  1.2.1
[  ] rabbitmq_sharding                 0.1.0
[  ] rabbitmq_shovel                   3.6.5
[  ] rabbitmq_shovel_management        3.6.5
[e*] rabbitmq_stomp                    3.6.5
[  ] rabbitmq_top                      3.6.5
[  ] rabbitmq_tracing                  3.6.5
[  ] rabbitmq_trust_store              3.6.5
[e*] rabbitmq_web_dispatch             3.6.5
[E*] rabbitmq_web_stomp                3.6.5
[  ] rabbitmq_web_stomp_examples       3.6.5
[e*] sockjs                            0.3.4
[e*] webmachine                        1.10.3

After some investigation is found out that the correct path to the rabbitmq-plugins script should be /usr/sbin/rabbitmq-plugins in stead of /usr/lib/rabbitmq/bin/rabbitmq-plugins

In commit ec5aff0 the path is changed for the Redhat OS

OS: {"name"=>"RedHat", "family"=>"RedHat", "release"=>{"full"=>"6.7", "major"=>"6", "minor"=>"7"}}
Rabbitmq: 3.6.5
Erlang: 19.0.4
Puppet: 3.6.2
Rabbitmq module: 5.4.0

puppet resource rabbitmq_exchange does not work

An exception (coming from the validate method in the exchange type) is raised, complaining about the type not being set. However, the type parameter is there, only that accessing it via self[:type] will not work.

invalid parameter provider

I'm getting:

err: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid parameter provider..

From this:
rabbitmq_plugin {'rabbitmq_management':
ensure => present,
provider => 'rabbitmqplugins',
}

If I remove the provider - it uses the default (which does nothing but fail :)

I tried (just to test) - to move the rabbitmqplugins.rb to default.rb - but then it just says:
err: Could not find a suitable provider for rabbitmq_plugin

Using puppet-2.7.21 - and just pulled latest puppetlabs-rabbitmq..

Any ideas as to what's up?

Error on using puppet resource rabbitmq_user

Per the docs, you should be able to see the current users with puppet resource rabbitmq_user.

That currently gives an error on both puppet 3.1.1 & 3.3.2:

Error: Could not run: Validation of Rabbitmq_user[guest] failed: must set password when creating user
Wrapped exception:
must set password when creating user

Manifest on master:
  class {'::rabbitmq':
}

  rabbitmq_user { 'usernamehere':
    admin    => true,
    password => 'XXXX',
  }

Rabbitmq_user_permissions parser fails for empty string

I'm configuring a 'read_only' user for a rabbitmq setup that only has read only access to a particular vhost. Using the rabbitmq_user_permissions provider, the module will properly set the permissions for the user, but on subsequent runs it will fail to parse the permissions of the user.

First run:

...
Notice: /Stage[main]/Tmp::Rabbitmq/Rabbitmq_user[read_only]/ensure: created
Notice: /Stage[main]/Tmp::Rabbitmq/Rabbitmq_user_permissions[read_only@/]/ensure: created

Second run:

Error: /Stage[main]/Tmp::Rabbitmq/Rabbitmq_user_permissions[read_only@/]: Could not evaluate: cannot parse line from list_user_permissions:/            .*

This is what I was testing with in a manifest:

  rabbitmq_user { 'read_only':
    admin    => false,
    password => 'ro_pass',
  }

  rabbitmq_user_permissions { 'read_only@/':
    configure_permission => '',
    read_permission      => '.*',
    write_permission     => '',
  }

Actual permissions in rabbitmq:

[root@vagrant-centos-6 ~]# rabbitmqctl list_user_permissions read_only
Listing permissions for user "read_only" ...
/           .*
...done.

Since rabbitmq permissions are regex expressions, the workaround is to use the '^$' regex instead of the empty string ('') permission. Setting the two empty string permissions in my test case to '^$' in the manifest (and manually on the rabbitmq server) prevents the parser error. An in-module fix may be to replace empty-string permissions with the '^$' regex before setting it in rabbitmq.

New permissions:

[root@vagrant-centos-6 ~]# rabbitmqctl list_user_permissions read_only
Listing permissions for user "read_only" ...
/   ^$  ^$  .*
...done.

http://www.rabbitmq.com/access-control.html

Enabling plugins does not restart the service

In my first puppet run i installed the service and in the second i added the federation plugin, but the server was not restarted and so the plugins not loaded (the rabbit web ui did not show the federation plugin)

rabbitmqadmin fails with puppet 2.7.21 with master (code from master branch)

I am using vagrant centos 6.2.
When I set puppet to local rabbitmqadmin installs fine.
But when I change it to master it fails.

I can't seem to find any event related to management plugin installation with a master.
But I see the curl command for rabbitmqadmin
Any pointers how I can figure this problem?

Add destination exchange for Shovel

Hi

I would like to add an exchange as a destination for a Shovel however I only see the option for dest-queue

My code look like this for a queue. How do I change it for the destination being an exhange?

  rabbitmq_parameter { 'WorkShovel@/':
    component_name => 'shovel',
    value          => {
      'src-uri'    => $src_uri,
      'src-queue'  => 'myqueue',
      'dest-uri'   => 'amqp://',
      'dest-queue' => 'mydestqueue',
    },

repos_ensure and version on RHEL 7

This module doesn't seem to work on RHEL 7 after trying to spin up a new cluster this morning. Its been a while since we've had to do this, but I've grabbed the latest from this repo, and after updating my code and removing params that are deprecated, I'm now unable to get the server pulled down from package cloud and receiving the error...

"Error: Could not update: Execution of '/bin/yum -d 0 -e 0 -y install rabbitmq-server-3.6.11' returned 1: One of the configured repositories failed (rabbitmq_rabbitmq-server),
and yum doesn't have enough cached data to continue."
...
failure: repodata/repomd.xml from rabbitmq_rabbitmq-server: [Errno 256] No more mirrors to try.
https://packagecloud.io/rabbitmq/rabbitmq-server/el/7Server/x86_64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found

Why is the rabbitmq repo not being used? The one at https://www.rabbitmq.com/releases/

You could use version, with package provider RPM, and specify the source as the rabbitmq.com repo...

    version                  => $rabbitmq_version,
    package_provider         => 'rpm',
    package_source           => "https://www.rabbitmq.com/releases/rabbitmq-server/v${rabbitmq_version}/rabbitmq-server-${rabbitmq_version}-1.el${$osmajversion}.noarch.rpm",

You could also do the same thing with erlang, which is also available on the rabbitmq.com repo...

package { 'erlang':
    ensure   => 'installed',
    source   => "https://www.rabbitmq.com/releases/erlang/erlang-${erlang_version}-1.el${osmajversion}.${distribution}.x86_64.rpm",
    provider => 'rpm'
}

i would think this could be put in place of the repo::rhel class and you'd get all of your dependencies without including any other modules.

Looking at #493, theres some confusion about which param to use to pin the version, which again, doesn't seem to work when using repos_ensure => true on RHEL 7.

puppetlabs-rabbitmq tries to install the rabbitmqadmin tools into /var/lib before enabling the management plugins

Initial runs on a rabbitmq server on Ubuntu 12 x86_64 show:

root@rabbitmq:~# puppet agent -t
info: Caching catalog for rabbitmq.aklabs.net
info: Applying configuration version '1382216214'
err: /Stage[main]/Rabbitmq::Install::Rabbitmqadmin/Exec[Download rabbitmqadmin]/returns: change from notrun to 0 failed: curl http://localhost:15672/cli/rabbitmqadmin -o /var/lib/rabbitmq/rabbitmqadmin returned 7 instead of one of [0] at /etc/puppet/modules/rabbitmq/manifests/install/rabbitmqadmin.pp:13
notice: /Stage[main]/Rabbitmq::Install::Rabbitmqadmin/File[/usr/local/bin/rabbitmqadmin]: Dependency Exec[Download rabbitmqadmin] has failures: true
warning: /Stage[main]/Rabbitmq::Install::Rabbitmqadmin/File[/usr/local/bin/rabbitmqadmin]: Skipping because of failed dependencies
notice: Finished catalog run in 0.72 seconds

... I was able to get around it by manually enabling rabbitmq_management, and restarting rabbitmq:

root@rabbitmq:~# rabbitmq-plugins enable rabbitmq_management
The following plugins have been enabled:
  mochiweb
  webmachine
  rabbitmq_web_dispatch
  amqp_client
  rabbitmq_management_agent
  rabbitmq_management
Plugin configuration has changed. Restart RabbitMQ for changes to take effect.
root@rabbitmq:~# /etc/init.d/rabbitmq-server restart
 * Restarting message broker rabbitmq-server                            [ OK ]
root@rabbitmq:~# curl http://192.168.100.211:15672/cli/rabbitmqadmin -o /var/lib/rabbitmq/rabbitmqadmin
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 32044  100 32044    0     0   794k      0 --:--:-- --:--:-- --:--:--  823k

... at which point everything worked fine:

root@rabbitmq:~# puppet agent -t
info: Caching catalog for rabbitmq.aklabs.net
info: Applying configuration version '1382216214'
notice: /Stage[main]/Rabbitmq::Install::Rabbitmqadmin/File[/usr/local/bin/rabbitmqadmin]/ensure: defined content as '{md5}117edfba1e0986b570a50664a46fe097'
notice: Finished catalog run in 0.64 seconds

rabbitmq version

Hi,
I see in the init.pp that you have version variable but i don't see that you use it anywhere
please advise
Thanks

version parameter does not work

When using version in the class definition is ignored and the version defined in the config.pp is the one used.

class { 'rabbitmq':
version => "3.2.2-1",
config_cluster => true,
cluster_nodes => [ "${rabbitmq_node1}", "${rabbitmq_node2}" ],
cluster_node_type => 'disc',
erlang_cookie => "${erlang_cookie}",
wipe_db_on_cookie_change => true,
}

Error message when creating an exchange with rabbitmq_exchange

When an exchange is declared a check is performed to see if the exchange exists. This check posts an error since the specified credentials are not being passed to the call. This is the same symptom that was fixed for the actual creation of the exchange in release 3.1.0. The exchange is created but there is still an error message logged since the default credentials do not have access to list the exchanges.

The rabbitmqadmin command is:
/usr/local/bin/rabbitmqadmin list exchanges

It should be:
/usr/local/bin/rabbitmqadmin list exchanges --user= --password=

Service['rabbitmq-server'] floats away

I'm building a Sensu server using sensu-puppet and v3.0.0 of this RabbitMQ module. I have the following relationship captured in my manifest:

if defined(Class['rabbitmq::service']) {
    ## if we're running rabbitmq on this node, ensure it's running before
    ## sensu starts, and also that a restart of rabbitmq triggers a restart
    ## of sensu.
    Class['rabbitmq::service'] ~> Class['sensu']
}

However, when applying this manifest, sensu-api is started before rabbitmq-server:

Info: Class[Rabbitmq::Service]: Scheduling refresh of Service[rabbitmq-server]
Notice: /Stage[main]/Rabbitmq::Service/Service[rabbitmq-server]: Triggered 'refresh' from 1 events
[… time passes …]
Error: Could not start Service[sensu-api]: Execution of '/etc/init.d/sensu-api start' returned 1: 
Error: /Stage[main]/Sensu::Service::Server/Service[sensu-api]/ensure: change from stopped to running failed: Could not start Service[sensu-api]: Execution of '/etc/init.d/sensu-api start' returned 1: 
Notice: /Stage[main]/Sensu::Service::Server/Service[sensu-api]: Triggered 'refresh' from 3 events

Management plugin requires restart before download

Using Vagrant, after a fresh install, I get an error when it tries to download rabbitmqadmin:

debug: Executing 'curl http://localhost:15672/cli/rabbitmqadmin -o /var/lib/rabbitmq/rabbitmqadmin'
err: /Stage[main]/Rabbitmq::Install::Rabbitmqadmin/Exec[Download rabbitmqadmin]/returns: change from notrun to 0 failed: curl http://localhost:15672/cli/rabbitmqadmin -o /var/lib/rabbitmq/rabbitmqadmin returned 7 instead of one of [0] at /tmp/vagrant-puppet/modules-0/rabbitmq/manifests/install/rabbitmqadmin.pp:13

If I then ssh into the box and run sudo service rabbitmq-server restart I can exit and run vagrant provision and all's well.

Here's my base.pp:

node default {

  package { 'curl':
    ensure => present
  }

  class { 'rabbitmq':
      service_manage    => false,
      port              => '5672',
      delete_guest_user => false,
  }
}

Duplicate declaration: Apt::Pin[rabbitmq] is already declared

I can't get this module to install rabbitmq at all. The error I see is:

Duplicate declaration: Apt::Pin[rabbitmq] is already declared in file /tmp/vagrant-puppet/modules-0/rabbitmq/manifests/repo/apt.pp at line 26; cannot redeclare at /tmp/vagrant-puppet/modules-0/apt/manifests/source.pp:56 on node precise64.wml.local

I'm using puppet with Vagrant.

Vagrantfile:

Vagrant.configure("2") do |config|
  config.vm.box = "precise64"
  config.vm.box_url = "http://files.vagrantup.com/precise64.box"

  config.vm.provision :puppet do |puppet|
    puppet.manifests_path = "manifests"
    puppet.manifest_file  = "site.pp"
    puppet.module_path    = "modules"
    puppet.options        = ['--debug', '--verbose']
  end
end

manifests/site.pp:

class { 'rabbitmq::repo::apt':
  pin    => 900,
  before => Class['rabbitmq::server']
}

class { 'rabbitmq::server':
  port              => '5673',
  delete_guest_user => true,
}

I installed the module with puppet module install -i modules/ puppetlabs/rabbitmq, so the only things in modules/ are apt/, stdlib/, and rabbitmq, none of which I've touched.

Any help would be appreciated! Below is the complete output from vagrant up which triggers a puppet apply.

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Importing base box 'precise64'...
[default] Matching MAC address for NAT networking...
[default] Setting the name of the VM...
[default] Clearing any previously set forwarded ports...
[default] Fixed port collision for 22 => 2222. Now on port 2200.
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Forwarding ports...
[default] -- 22 => 2200 (adapter 1)
[default] Booting VM...
[default] Waiting for VM to boot. This can take a few minutes.
[default] VM booted and ready for use!
[default] Configuring and enabling network interfaces...
[default] Mounting shared folders...
[default] -- /vagrant
[default] -- /tmp/vagrant-puppet/manifests
[default] -- /tmp/vagrant-puppet/modules-0
[default] Running provisioner: puppet...
Running Puppet with site.pp...
stdin: is not a tty
info: Loading facts in /tmp/vagrant-puppet/modules-0/stdlib/lib/facter/facter_dot_d.rb
info: Loading facts in /tmp/vagrant-puppet/modules-0/stdlib/lib/facter/pe_version.rb
info: Loading facts in /tmp/vagrant-puppet/modules-0/stdlib/lib/facter/puppet_vardir.rb
info: Loading facts in /tmp/vagrant-puppet/modules-0/stdlib/lib/facter/root_home.rb
debug: importing '/tmp/vagrant-puppet/modules-0/rabbitmq/manifests/server.pp' in environment production
debug: Automatically imported rabbitmq::server from rabbitmq/server into production
debug: importing '/tmp/vagrant-puppet/modules-0/rabbitmq/manifests/repo/apt.pp' in environment production
debug: Automatically imported rabbitmq::repo::apt from rabbitmq/repo/apt into production
debug: Scope(Class[Rabbitmq::Repo::Apt]): Retrieving template rabbitmq/rabbit.pub.key
debug: template[/tmp/vagrant-puppet/modules-0/rabbitmq/templates/rabbit.pub.key]: Bound template variables for /tmp/vagrant-puppet/modules-0/rabbitmq/templates/rabbit.pub.key in 0.00 seconds
debug: template[/tmp/vagrant-puppet/modules-0/rabbitmq/templates/rabbit.pub.key]: Interpolated template /tmp/vagrant-puppet/modules-0/rabbitmq/templates/rabbit.pub.key in 0.00 seconds
debug: importing '/tmp/vagrant-puppet/modules-0/apt/manifests/init.pp' in environment production
debug: importing '/tmp/vagrant-puppet/modules-0/apt/manifests/source.pp' in environment production
debug: Automatically imported apt::source from apt/source into production
debug: importing '/tmp/vagrant-puppet/modules-0/apt/manifests/pin.pp' in environment production
debug: Automatically imported apt::pin from apt/pin into production
debug: Scope(Class[Rabbitmq::Server]): Retrieving template rabbitmq/rabbitmq.config
debug: template[/tmp/vagrant-puppet/modules-0/rabbitmq/templates/rabbitmq.config]: Bound template variables for /tmp/vagrant-puppet/modules-0/rabbitmq/templates/rabbitmq.config in 0.00 seconds
debug: template[/tmp/vagrant-puppet/modules-0/rabbitmq/templates/rabbitmq.config]: Interpolated template /tmp/vagrant-puppet/modules-0/rabbitmq/templates/rabbitmq.config in 0.00 seconds
debug: Scope(Class[Rabbitmq::Server]): Retrieving template rabbitmq/rabbitmq-env.conf.erb
debug: template[/tmp/vagrant-puppet/modules-0/rabbitmq/templates/rabbitmq-env.conf.erb]: Bound template variables for /tmp/vagrant-puppet/modules-0/rabbitmq/templates/rabbitmq-env.conf.erb in 0.00 seconds
debug: template[/tmp/vagrant-puppet/modules-0/rabbitmq/templates/rabbitmq-env.conf.erb]: Interpolated template /tmp/vagrant-puppet/modules-0/rabbitmq/templates/rabbitmq-env.conf.erb in 0.00 seconds
debug: importing '/tmp/vagrant-puppet/modules-0/rabbitmq/manifests/service.pp' in environment production
debug: Automatically imported rabbitmq::service from rabbitmq/service into production
debug: Failed to load library 'selinux' for feature 'selinux'
debug: importing '/tmp/vagrant-puppet/modules-0/apt/manifests/params.pp' in environment production
debug: Automatically imported apt::params from apt/params into production
debug: importing '/tmp/vagrant-puppet/modules-0/apt/manifests/update.pp' in environment production
debug: Automatically imported apt::update from apt/update into production
debug: Scope(Apt::Source[rabbitmq]): Retrieving template apt/source.list.erb
debug: template[/tmp/vagrant-puppet/modules-0/apt/templates/source.list.erb]: Bound template variables for /tmp/vagrant-puppet/modules-0/apt/templates/source.list.erb in 0.00 seconds
debug: template[/tmp/vagrant-puppet/modules-0/apt/templates/source.list.erb]: Interpolated template /tmp/vagrant-puppet/modules-0/apt/templates/source.list.erb in 0.00 seconds
Duplicate declaration: Apt::Pin[rabbitmq] is already declared in file /tmp/vagrant-puppet/modules-0/rabbitmq/manifests/repo/apt.pp at line 26; cannot redeclare at /tmp/vagrant-puppet/modules-0/apt/manifests/source.pp:56 on node precise64.wml.local
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

cd /tmp/vagrant-puppet/manifests && puppet apply --debug --verbose --modulepath '/etc/puppet/modules:/tmp/vagrant-puppet/modules-0' site.pp --detailed-exitcodes || [ $? -eq 2 ]

EPEL RPM does not install /usr/sbin/rabbitmq-plugins

I ran into an issue using this module on centos 6.X as the provider would not load because /usr/sbin/rabbitmq-plugins did not exist. I noticed that the rpm that comes from EPEL does not include /usr/sbin/rabbitmq-plugins where as the one from rabbitmq does.

I opened https://bugzilla.redhat.com/show_bug.cgi?id=1020447 to find out if the missing binary is by design or by accident. If it's by design we would need to add the following resources.

  file {
    '/usr/sbin/rabbitmq-plugins':
      ensure  => link,
      target  => '/usr/lib/rabbitmq/bin/rabbitmq-plugins',
      require => Package['rabbitmq-server'],;
    '/usr/sbin/rabbitmq-env':
      ensure  => link,
      target  => '/usr/lib/rabbitmq/bin/rabbitmq-env',
      require => Package['rabbitmq-server'],;
  }

Puppet 3.x.

As far as I can tell, this module doesn't work in Puppet 3.x. Please take on of the pull requests that fixes this. :(

I think the missing HOME is the only outstanding issue?

Release puppet/rabbitmq 6.0.0

We want to release the first Voxpupuli puppet namespace as soon as possible. There are a few things we should probably get done first though.

  • Add README badges
  • modulesync
  • Update Development section of README
  • Update outdated Apt module compatibility README section
  • Sync labels
  • Migrate existing changelog to HISTORY.md
  • Tweak Issue/PR titles and labels for better 6.0.0 changelog
  • Fix and / or add ignore statements for remaining Rubocop warnings
  • Add module to modulesync_config repo
  • Add module to plumbing
  • #606 probably should be merged (ideally with tests) first
  • Investigate #611

Add support for max-length-bytes as a integer

We already support supplying max-length as an integer, but max-length-bytes isn't. When supplying the parameter, the module translates it into a string which won't work in the rabbitmq config file. We've added this patch for now to get around this issue, would love to see this get patch in the module in the future

index 37fd3de..393c175 100644
--- a/modules/rabbitmq/lib/puppet/type/rabbitmq_policy.rb
+++ b/modules/rabbitmq/lib/puppet/type/rabbitmq_policy.rb
@@ -99,6 +99,12 @@ Puppet::Type.newtype(:rabbitmq_policy) do
         raise ArgumentError, "Invalid max-length value '#{max_length_val}'"
       end
     end
+    if definition.key? 'max-length-bytes'
+      max_length_bytes_val = definition['max-length-bytes']
+      unless max_length_bytes_val.to_i.to_s == max_length_bytes_val
+        raise ArgumentError, "Invalid max-length-bytes value '#{max_length_bytes_val}'"
+      end
+    end
     if definition.key? 'shards-per-node'
       shards_per_node_val = definition['shards-per-node']
       unless shards_per_node_val.to_i.to_s == shards_per_node_val
@@ -126,6 +132,9 @@ Puppet::Type.newtype(:rabbitmq_policy) do
     if definition.key? 'max-length'
       definition['max-length'] = definition['max-length'].to_i
     end
+    if definition.key? 'max-length-bytes'
+      definition['max-length-bytes'] = definition['max-length-bytes'].to_i
+    end
     if definition.key? 'shards-per-node'
       definition['shards-per-node'] = definition['shards-per-node'].to_i
     end

HOME must be set for rabbitmq-plugins

I'm running puppet 3.2.2 on CentOS 6.4 and get the following error when using this module.

Error: /Stage[main]/Rabbitmq/Rabbitmq_plugin[rabbitmq_management]: Could not evaluate: Execution of '/usr/sbin/rabbitmq-plugins list -E' returned 1: erlexec: HOME must be set

I know that puppet 3 changed how environment variables where done with execs and see the plugin provider has:

  if Puppet::PUPPETVERSION.to_f < 3
    commands :rabbitmqplugins => 'rabbitmq-plugins'
  else
    has_command(:rabbitmqplugins, 'rabbitmq-plugins') do
      environment :HOME => "/tmp"
    end
  end

which to me means HOME should be set for the command. I tried commenting out the conditional to ensure the else was being evaluated without any change.

To make the install as simple as possible I have only:

class { 'rabbitmq': }

on the node. Any guidance or thoughts on this?

Admin checks in rabbitmq_user

Hi,

I'm using this code:

RabbitMQ server

class { "rabbitmq::server":
delete_guest_user => true,
config => template('broker/rabbitmq.config.erb')
}

User.

rabbitmq_user { 'user':
password => 'password',
admin => false,
provider => 'rabbitmqctl',
}

Vhost.

rabbitmq_vhost { 'app':
provider => 'rabbitmqctl',
}

Basic Permissions

rabbitmq_user_permissions { 'user@app':
configure_permission => '.',
read_permission => '.
',
write_permission => '.*',
provider => 'rabbitmqctl',
}

After apply this I get this error:

err: /Stage[main]/Rabbitmq::Server/Rabbitmq_user[guest]: Could not evaluate: Could not match line 'guest (true|false)' from list_users (perhaps you are running on an older version of rabbitmq that does not support admin users?)

I'm using rabbitmq 2.6.1-1 in debian testing.

From http://www.rabbitmq.com/man/rabbitmqctl.1.man.html the way to set an user as admin is to set tags and there is no set_admin or clear_admin commands.

What can I do? should I downgrade to 2.5?

Thanks.

3.0.0-rc2 causes librarian-update to fail

Since the new release librarian-update fails with this error message:


/usr/lib/ruby/site_ruby/1.8/rubygems/version.rb:182:in `initialize': Malformed version number string 3.0.0-rc2 (ArgumentError)
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/manifest.rb:12:in `new'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/manifest.rb:12:in `initialize'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/manifest.rb:117:in `new'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/manifest.rb:117:in `_normalize_version'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/manifest.rb:101:in `fetched_version'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/manifest.rb:55:in `version'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/manifest.rb:85:in `satisfies?'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/dependency.rb:65:in `satisfied_by?'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:65:in `recursive_resolve'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/dsl/receiver.rb:33:in `all?'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:65:in `each'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:65:in `all?'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:65:in `recursive_resolve'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:103:in `scope'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:64:in `recursive_resolve'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:60:in `each'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:60:in `recursive_resolve'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:103:in `scope'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:59:in `recursive_resolve'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:103:in `scope'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:42:in `recursive_resolve'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:72:in `recursive_resolve'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:103:in `scope'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:64:in `recursive_resolve'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:60:in `each'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:60:in `recursive_resolve'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:103:in `scope'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:59:in `recursive_resolve'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:103:in `scope'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:42:in `recursive_resolve'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:72:in `recursive_resolve'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:103:in `scope'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:64:in `recursive_resolve'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:60:in `each'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:60:in `recursive_resolve'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:103:in `scope'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:59:in `recursive_resolve'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:103:in `scope'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:42:in `recursive_resolve'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:72:in `recursive_resolve'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:103:in `scope'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:64:in `recursive_resolve'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:60:in `each'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:60:in `recursive_resolve'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:103:in `scope'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:59:in `recursive_resolve'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:103:in `scope'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:42:in `recursive_resolve'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:20:in `resolve'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver.rb:18:in `resolve'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/action/resolve.rb:25:in `run'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/cli.rb:161:in `resolve!'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/cli.rb:103:in `update'
    from /usr/lib/ruby/gems/1.8/gems/thor-0.18.1/lib/thor/command.rb:27:in `__send__'
    from /usr/lib/ruby/gems/1.8/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
    from /usr/lib/ruby/gems/1.8/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
    from /usr/lib/ruby/gems/1.8/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
    from /usr/lib/ruby/gems/1.8/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/cli.rb:29:in `bin!'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.9/bin/librarian-puppet:9
    from /usr/bin/librarian-puppet:19:in `load'
    from /usr/bin/librarian-puppet:19

Is this a general problem from this super awesome module (and thanks for new release) or is this a librarian-puppet problem?

Thanks in advance
Björn

Illegal cluster node name

I've received this error message while attempting to use rabbitmq module:

Error: Illegal name. The given name _cluster_nodes does not conform to the naming rule \A((::)?[a-z0-9]w*)(::[a-z0-9]w*)*\z at /etc/puppet/modules/rabbitmq/manifests/config.pp:45:5

I've just followed the first basic example as suggested by the documentation :

class { 'rabbitmq':
    service_manage      => false,
    port                => '5672',
    delete_guest_user   => true,
}

I've renamed the $_cluster_nodes variable to $cluster_nodes_ both in rabbitmq.config.erb and config.pp. Is there anything else to do? Is that a proper fix?

handle different user tags

It looks like lib/puppet/provider/rabbitmq_user/rabbitmqctl.rb does not handle user tags != 'administrator'. Encountered this when I manually added a user 'zabbix' with tag 'monitoring'.

rabbitmqctl output:

$ sudo rabbitmqctl list_users
Listing users ...
admin   [administrator]
guest   []
zabbix  [monitoring]
...done.

'puppet agent -t' output

Error: /Stage[main]/rabbitmq_setup/Rabbitmq_user[zabbix]/ensure:
change from absent to present failed: Execution of
'/usr/sbin/rabbitmqctl add_user zabbix zabbix' returned 2:
Creating user "zabbix" ...
Error: user_already_exists: zabbix

erlang_cookie detection was better when NOT facter based

the new erlang_cookie change detection is based on a facter
...which is not covered by an rspec btw (I'm trying to, any help is welcome)
seems to lead a continuous un-needed erlang/rabbitmq db deletion

based on the feedback from my colleagues,
the previous implementation "file based" seems to be preferred and more portable across puppet versions

      exec { 'wipe_db':
        command => '/etc/init.d/rabbitmq-server stop; /bin/rm -rf /var/lib/rabbitmq/mnesia',
        require => Package[$package_name],
        unless  => "/bin/grep -qx ${erlang_cookie} /var/lib/rabbitmq/.erlang.cookie"
      }

Parameter config_mirrored_queues has no effect

The parameter config_mirrored_queues has no effect when set to true.

Before RabbitMQ 3.0, the HA was controlled by the client when declaring the queue using x-ha-policy.

With RabbitMQ 3.0, this behavior is now controlled by a policy on the server side. [1] The HA policy can be applied to specific queues matching a pattern. The HA mode can also be set to different values:
http://www.rabbitmq.com/ha.html#genesis

I therefore don't know how puppetlabs-rabbitmq should implement the parameter config_mirrored_queues.

Personally, I create an HA policy (matching my requirements) using a defined resource similar to this one:

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 => Package['rabbitmq-server'],
  }
}
node 'rabbitmq.example.org' {
  # ...
  rabbitmq::policy { 'ha-all':
    pattern    => '.*',
    definition => '{"ha-mode":"all","ha-sync-mode":"automatic"}'
  }
}

[1] http://www.rabbitmq.com/blog/2012/11/19/breaking-things-with-rabbitmq-3-0/

Cannot override apt repository location or disable its configuration

There is no way to disable the configuration of the apt repository and/or override the location of the apt repository.

I manage the apt repository configuration myself and point it to a private repository.

I wish to be able to disable the configuration of the apt repository and/or need the ability to override its location.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.