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::check notifies the server even when not running the service #171

Closed
ripienaar opened this issue Mar 25, 2014 · 1 comment · Fixed by #190
Closed

sensu::check notifies the server even when not running the service #171

ripienaar opened this issue Mar 25, 2014 · 1 comment · Fixed by #190

Comments

@ripienaar
Copy link

https://github.com/sensu/sensu-puppet/blob/master/manifests/check.pp#L119 will notify the sensu::server::service class whenever a check changes.

The sensu::server::service class will correctly set ensure and enable but when notifying the class puppet will log confusing lines:

Notice: /Stage[main]/Sensu::Server::Service/Service[sensu-server]: Triggered 'refresh' from 1 events

when in fact what it's doing is the right thing, it notices that the service is stopped and does not restart it:

Debug: Executing '/etc/init.d/sensu-api status'
Debug: Service[sensu-server](provider=upstart): Could not find sensu-server.conf in /etc/init
Debug: Service[sensu-server](provider=upstart): Could not find sensu-server.conf in /etc/init.d
Debug: Service[sensu-server](provider=upstart): Could not find sensu-server in /etc/init
Debug: Executing '/etc/init.d/sensu-server status'
Debug: Executing '/etc/init.d/sensu-server status'
Debug: /Stage[main]/Sensu::Server::Service/Service[sensu-server]: Skipping restart; service is not running
Notice: /Stage[main]/Sensu::Server::Service/Service[sensu-server]: Triggered 'refresh' from 1 events

To avoid the confusing message I think the server::service class should only be notified if $sensu::server is true

@jlambert121
Copy link
Contributor

@ripienaar Does #190 work for you? There is likely a more elegant way of doing that I'm not aware of too.

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 a pull request may close this issue.

2 participants