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

Use redhat init instead of "init" init #248

Closed
wants to merge 1 commit into from

Conversation

benpillet
Copy link

https://docs.puppetlabs.com/puppet/3.8/reference/types/service.html#service-provider-redhat

I had CentOS 6 nodes in an autoscaling group. When they would get scaled down/terminated, consul would show them as failed. I had leave_on_terminate set to true, but I was still seeing the error. When I ran chkconfig on the box, the consul service wasn't listed. So, the K20consul script was not getting called in /etc/rc6.d and the node wasn't leaving the cluster. Please correct me if I'm wrong, but I suspect this provider is the right one for the operatingsystem entries listed. Also, is this even necessary as puppet is supposed to pick the "best" init_style for a service anyway. Should most of these elsif entries just be removed?

@benpillet
Copy link
Author

I should've actually tried this patch on my box. Looks like it doesn't work because of config.pp line 82. I commented out the provider line in run_service.pp. Is the provider necessary? i.e. Commenting it out on CentOS 6 works, but isn't clean for all the other platforms. Any reason not to trust the default puppet service provider?

@solarkennedy
Copy link
Contributor

Yea, we basically can't make everyone happy. See #125

@cliles
Copy link

cliles commented Apr 26, 2016

@solarkennedy - #125 also introduces a break for Amazon linux.

@cliles
Copy link

cliles commented Apr 26, 2016

init provider is a poor choice, it does not support enable.

https://docs.puppet.com/puppet/latest/reference/type.html#service-providers

Perhaps #125 should have only introduced changes for debian via an if block?

@solarkennedy
Copy link
Contributor

Well, if we know we are on redhat then I guess it should be safe to use the redhat provider (baring systemd)

I'm convinced. @benpillet I'll merge this in as soon as you fix the tests and rebase.

@gasparch
Copy link

gasparch commented Jun 7, 2016

fixed problems for me as well on CentOS 6.8

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.

None yet

4 participants