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

Fixissue197 #241

Merged
merged 2 commits into from
Sep 17, 2014
Merged

Fixissue197 #241

merged 2 commits into from
Sep 17, 2014

Conversation

zanloy
Copy link
Contributor

@zanloy zanloy commented Sep 17, 2014

This should fix issue #197, the final commit removes an unnecessary function call that errored if you did not define "install_repo => 'true'" (notice single quotes) in your class declaration. The default was true which is already a bool.

jamtur01 added a commit that referenced this pull request Sep 17, 2014
@jamtur01 jamtur01 merged commit 6794e61 into sensu:master Sep 17, 2014
@jamtur01
Copy link
Contributor

Neat! Thanks!

@zanloy zanloy deleted the fixissue197 branch September 17, 2014 15:05
@jamtur01
Copy link
Contributor

@zanloy Looks like the tests are failing. I am going to revert - can you please update and fix tests! Thanks!

@jamtur01 jamtur01 mentioned this pull request Sep 17, 2014
@zanloy zanloy restored the fixissue197 branch September 17, 2014 15:28
@zanloy
Copy link
Contributor Author

zanloy commented Sep 17, 2014

How are you doing testing? rspec? Rake?

@jamtur01
Copy link
Contributor

@zanloy
Copy link
Contributor Author

zanloy commented Sep 17, 2014

I can't fix that test requirement. It's the File['/etc/sensu/plugins'] declaration that was actually causing the issue. I have to rename the file declaration to prevent puppet from redeclaring what is already declared in package.pp:63. I have tested in my own environment using the following declaration that causes the initial error:

class { 'sensu':
rabbitmq_host => $host,
rabbitmq_port => $port,
rabbitmq_vhost => $vhost,
rabbitmq_password => $password,
subscriptions => $subscriptions,
rabbitmq_ssl_private_key => "puppet:///modules/profiles/sensu/ssl/client.key",
rabbitmq_ssl_cert_chain => "puppet:///modules/profiles/sensu/ssl/client.crt",
use_embedded_ruby => $use_embedded_ruby,
}

sensu::plugin { 'puppet:///modules/profiles/sensu/plugins':
type => 'directory',
}

@zanloy
Copy link
Contributor Author

zanloy commented Sep 17, 2014

Here is the error thrown from the initial issue:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Duplicate declaration: File[/etc/sensu/plugins] is already declared in file /etc/puppetlabs/puppet/enviro
nments/production/modules/sensu/manifests/package.pp:63; cannot redeclare at /etc/puppetlabs/puppet/environments/production/modules/sensu/manifests/plugin.pp:81 on node puppet.lab.
stopso.com

@zanloy
Copy link
Contributor Author

zanloy commented Sep 17, 2014

I'm very new to github but if I can change the rspec test then I can get it to pass. I wasn't sure if changing test was bad etiquette or not.

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.

2 participants