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

explicitly set service provider on redhat systems #18

Merged
merged 1 commit into from
Mar 21, 2016

Conversation

adamcstephens
Copy link
Contributor

filebeat ships an init script, even on EL7 systems. puppet 4 cannot correctly check the status of init scripts through the EL7 systemd->init wrapper and thus attempts to start the service every time. While this doesn't actually try and start the service, the systemd wrapper is smart enough, it does cause an always changing scenario on every run.

Explicitly setting the provider to 'redhat' solves this and is safe even on older non-systemd redhat systems.

case $::osfamily {
'RedHat': {
$service_provider = 'redhat'
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if service_provider is set to redhat on versions < 7? Does everything still work?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it does. I had actually updated the original comment to add that. This is the default provider in < 7:

https://docs.puppetlabs.com/puppet/latest/reference/type.html#service-provider-redhat

pcfens added a commit that referenced this pull request Mar 21, 2016
explicitly set service provider on redhat systems
@pcfens pcfens merged commit d0e4e0c into pcfens:master Mar 21, 2016
@pcfens
Copy link
Owner

pcfens commented Mar 21, 2016

Thanks for catching this - I pushed this up to the forge in v0.5.8.

@adamcstephens
Copy link
Contributor Author

Thanks for the quick turnaround!

@adamcstephens adamcstephens deleted the redhat_service branch March 21, 2016 18:54
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.

2 participants