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

sensu-plugin is "removed" every puppet run #298

Closed
robinbowes opened this issue Jan 23, 2015 · 8 comments
Closed

sensu-plugin is "removed" every puppet run #298

robinbowes opened this issue Jan 23, 2015 · 8 comments

Comments

@robinbowes
Copy link

puppet attempts to remove the sensu-plugin package every run, producing this output:

Info: Applying configuration version '1421975032'
Notice: /Stage[main]/Sensu::Package/Package[sensu-plugin]/ensure: removed
Info: Class[Sensu::Package]: Scheduling refresh of Service[sensu-client]
Info: Class[Sensu::Package]: Scheduling refresh of Service[sensu-api]
Info: Class[Sensu::Package]: Scheduling refresh of Service[sensu-server]
Notice: /Stage[main]/Sensu::Client::Service/Service[sensu-client]: Triggered 'refresh' from 1 events
Notice: /Stage[main]/Sensu::Api::Service/Service[sensu-api]: Triggered 'refresh' from 1 events
Notice: /Stage[main]/Sensu::Server::Service/Service[sensu-server]: Triggered 'refresh' from 1 events
Notice: Finished catalog run in 7.95 seconds

This is puppet 3.7.3 on CentOS 7.

@robinbowes
Copy link
Author

This seems to be because sensu_plugin_provider defaults to undef, which means $plugin_provider gets set to 'sensu_gem', which causes the package resource to always run to remove the sensu-plugin package using the sensu_gem provider.

A workaround for the issue is to explicitly set the sensu_plugin_provider to the default for the platform (I'm using CentOS 7, so "yum"). That prevents the problem.

A better fix would be to re-work the logic around setting the $plugin_provider variable.

@nhinds
Copy link
Contributor

nhinds commented Jan 24, 2015

My workaround for this is to set sensu::sensu_plugin_version to present which ensures it's in the correct state.

This is only an issue if you have sensu::use_embedded_ruby set to true (or if you have it set to false and you want sensu-plugin as one of your system gems, I guess, but I haven't tested that scenario)

@YHSC
Copy link

YHSC commented Feb 17, 2015

@nhinds thanks for the hint wrt embedded ruby, solved my issue. would be good to have this documented.

@queeno
Copy link
Contributor

queeno commented Mar 20, 2015

This issue has been fixed in 78236fd

I believe this issue has been now resolved.

@devopsprosiva
Copy link

I still see the issue. I'm using Puppet 4 and CentOS 7.

@devshorts
Copy link

same

@jlambert121
Copy link
Contributor

@devopsprosiva and @devshorts are you still seeing the issue running from master and restarting the puppet master after upgrading the sensu module? (It is important to restart the puppet master so it reloads the types and providers)

@jlambert121
Copy link
Contributor

If this is still an issue, we'll hopefully get it resolved as part of fixing #328.

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

No branches or pull requests

7 participants