-
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
Sensu-client service enable is not idempotent on CentOS 7 #448
Comments
Not sure if it matters, but I was also using the |
I noticed this when I upgraded to puppet 4.2.2 and not having native systemd unit files was my guess too, but I haven't had any time to investigate. |
Ah yes, forgot to mention I am also on Puppet 4.2.2. |
I had this same issue after I moved to 4.2.2 too. I did some investigation and found the issue. Sensu is not configured to use SystemD. So on Cent7 puppet will ask SystemD what the service startup status is. SystemD has no idea and returns either no value or a value that states unknown. This results in every puppet run trying to set the state to "enabled". I ended up fixing this though in my local copy of the Sensu module by adding "provider => 'redhat'" to all of the service definitions. So it might be good to add some logic to the module so if your using a redhat based os to use a provider of "redhat" vs letting puppet just figure it out. |
@jbehrends Hmmm, that makes sense. Thanks for providing your research! @jlambert121 What do you recommend? I could create a pull request for this, but once sensu is packaged to use systemd natively that logic won't work right. My initial thought was waiting until the CentOS 7 package uses systemd and then just make sure I use that version going forward. |
Maybe this would help https://tickets.puppetlabs.com/browse/PUP-5296 |
I don't think this is related to the module itself, it's an upstream problem with sensu and Puppet 4. I'm going to close it based on that |
I am currently trying to use this module to configure sensu-client on both CentOS 6 and 7 nodes. Everything works perfectly on CentOS 6 and it is idempotent. On CentOS 7 it will always think that the sensu-client service is not enabled and then enable it. Here is the output I get every run:
I suspect this is because the sensu package does not use systemd natively. There is a pull request open currently sensu/sensu-build#122. I'll wanted to open up an issue here to see if anyone else has this issue and if they were able to solve it.
The text was updated successfully, but these errors were encountered: