Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Illegal rabbitmq cluster nodes with Puppet

I rely on Librarian-puppet to install rabbitmq in a vagrant box.

Puppet version is 3.4.0

My Puppetfile contains

forge "http://forge.puppetlabs.com"
[...]
mod 'rabbitmq', :git => 'git://github.com/puppetlabs/puppetlabs-rabbitmq'

By following the documentation, I intend to install RabbitMQ server with the next instruction:

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

By doing so, I've encountered the following error message:

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

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:47:5 

The actual config.pp file contains the next code block:

# Handle deprecated option.
if $cluster_disk_nodes != [] {
    notify { 'cluster_disk_nodes':
        message => 'WARNING: The cluster_disk_nodes is deprecated.
        Use cluster_nodes instead.',
    }
    $_cluster_nodes = $cluster_disk_nodes # line 45
} else {
    $_cluster_nodes = $cluster_nodes # line 47
}

Could anyone provide me with a valid instance of cluster node name? The regular expression apparently used for validation looks a bit cryptic to me.

I'm also wondering how the _cluster_nodes values are validated... Where does the regular expression used for validation comes from?

like image 262
Thierry Marianne Avatar asked Dec 10 '25 19:12

Thierry Marianne


1 Answers

This issue was not about the value of variables ($cluster_nodes or $cluster_disk_nodes) and it was rather the variables names which were incorrect. A variable name shall not start with '_' anymore (as expressed by the regular expression and the actual error message). I just got lost in translation.

I've opened an issue on github and I've sent a PR, which attempts to fix it:

https://github.com/puppetlabs/puppetlabs-rabbitmq/issues/163

https://github.com/puppetlabs/puppetlabs-rabbitmq/pull/164

To follow up with this issue, it was equally fixed by another PR, which got actually merged:

https://github.com/puppetlabs/puppetlabs-rabbitmq/pull/160

like image 135
Thierry Marianne Avatar answered Dec 12 '25 12:12

Thierry Marianne



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!