-
Notifications
You must be signed in to change notification settings - Fork 289
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
Dependency cycle when using sensu::handler in the same catalogue as sensu server #186
Comments
Why are you adding the require on your class { 'sensu': } definition? The module should take care of that itself. If it isn't we have an issue there that needs to be resolved. If you remove those do you still have the problem? |
That works but I am not sure why, as the require is for two custom internal classes which ensure redis/rabbitmq are installed/configured appropriately, and do not configure sensu at all. |
I just realized the requires are sensu_config not sensu, but that fixing does sound like we're heading down the right path. Looking at your dependency loop at the top, it looks like one of your sensu_config classes is setting up sensu::handler{'pagerduty'}. The handler requires the rest of the sensu class to complete before it can be installed, but the sensu class is requiring your config to complete before it can be installed. The Sensu module itself will take care of restarts as its config changes so you shouldn't need to require anything for the sensu class except the actual redis and rabbitmq setup and config, all other things that are sensu defines (sensu::check, sensu::handler....) should not be in the require chain. Does that make sense? |
I'm going to go ahead and close this one, I believe it is an issue between the interaction of your sensu_config class and the sensu class and a circular require dependency between them rather than an issue with the sensu module. If this isn't correct, please reopen this and provide a copy of your sensu_config module (with sensitive things redacted). |
I am getting the following error from the puppet agent run on the host which is my sensu server.
The following is the relevant configuration on this host:
This happens for any handler that I specify. Not specifying any handlers results in no errors.
The text was updated successfully, but these errors were encountered: