Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(#598) Improve rabbitmq clustering robustness #742

Merged
merged 1 commit into from
Jul 13, 2017

Conversation

jeffmccune
Copy link
Collaborator

@jeffmccune jeffmccune commented Jul 13, 2017

Without this patch, Puppet errors out when both sensu::rabbitmq_password, or
any of the sensu::rabbitmq_* parameters are specified along with
sensu::rabbitmq_cluster. The error is:

Error: /Stage[main]/Sensu::Rabbitmq::Config/Sensu_rabbitmq_config[sensu-server.example.com]: Could not evaluate: no implicit conversion of String into Integer
/vagrant/lib/puppet/provider/sensu_rabbitmq_config/json.rb:137:in `[]'
/vagrant/lib/puppet/provider/sensu_rabbitmq_config/json.rb:137:in `password'

This patch addresses the problem by changing sensu::rabbitmq::config to ignore
sensu::rabbitmq_* class parameters when the cluster configuration is specified
via sensu::rabbitmq_cluster.

Resolves #598

@jeffmccune jeffmccune changed the title (#568) Improve rabbitmq clustering robustness (#598) Improve rabbitmq clustering robustness Jul 13, 2017
@jeffmccune jeffmccune self-assigned this Jul 13, 2017
@ghoneycutt
Copy link
Collaborator

Thanks @jeffmccune

Looks good. Please rebase for a clean merge.

@jeffmccune
Copy link
Collaborator Author

Looks good. Please rebase for a clean merge.

Thanks! Change has been rebased, Vagrantfile resolved and clean.

@ghoneycutt
Copy link
Collaborator

Merged some of your other work first and it caused a merge conflict. Could you please rebase again for me and I'll merge this next.

@jeffmccune
Copy link
Collaborator Author

Will rebase shortly.

Without this patch, Puppet errors out when both `sensu::rabbitmq_password`, or
any of the `sensu::rabbitmq_*` parameters are specified along with
`sensu::rabbitmq_cluster`.  The error is:

    Error: /Stage[main]/Sensu::Rabbitmq::Config/Sensu_rabbitmq_config[sensu-server.example.com]: Could not evaluate: no implicit conversion of String into Integer
    /vagrant/lib/puppet/provider/sensu_rabbitmq_config/json.rb:137:in `[]'
    /vagrant/lib/puppet/provider/sensu_rabbitmq_config/json.rb:137:in `password'

This patch addresses the problem by changing sensu::rabbitmq::config to ignore
sensu::rabbitmq_* class parameters when the cluster configuration is specified
via `sensu::rabbitmq_cluster`.

Resolves sensu#598
@jeffmccune
Copy link
Collaborator Author

Rebased.

@ghoneycutt ghoneycutt merged commit d7c8ab4 into sensu:master Jul 13, 2017
@ghoneycutt
Copy link
Collaborator

Released in v2.24.0

@csoleimani
Copy link

Thanks for fixing this! I can confirm that I can run puppet now without it failing. However, I did notice that puppet doesn't seem to manage the sensu-api service anymore with this change. I tried putting a

service { 'sensu-api':
    ensure => running,
}

block into my manifest, but then I got a duplicate resource declaration error. I even tried putting manage_services => true (although it is by default), and it still wont start the sensu-api service. I tried stopping the sensu-enterprise service, and puppet did restart it, so I think it's only ignoring the sensu-api service for some reason.

@ghoneycutt
Copy link
Collaborator

I believe the sensu-api service is not meant to run when using sensu-enterprise as it provides its own API service.

@csoleimani
Copy link

You're right. I figured out why I was running into issues and created a pull request to fix the problem:
#751

@ghoneycutt
Copy link
Collaborator

Thanks @csoleimani !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants