-
-
Notifications
You must be signed in to change notification settings - Fork 548
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 systemd on RHEL/CentOS 7 #335
Conversation
This looks good to me, can you update the serverspec and chefspec to match? |
This will break Amazon Linux support #302 Amazon Linux does not use systemd, but it does return |
@drpebcak yes leaving that to chef is better rather than hard coding it. |
Does RHEL/etc < 7 or Amazon need the reload command defined this way external to the package-provided init scripts? Should all of the case statements just be removed? |
I believe the |
@joerocklin this is because redhat (and fedora) do not use We can not decide upon a server provider and just leave that decision to chef itself. It is much better at that and it is important for that to be consistent across cookbooks. |
where are with this one @drpebcak ? |
Not sure what we wanted to do for this. We could say: if node['platform_version'].to_f < 7.0 || node['platform'] == 'amazon'
reload_command '/sbin/service httpd graceful'
else
provider Chef::Provider::Service::Systemd
end |
@drpebcak I wouldn't even specify the provider, just let chef handle that. if node['platform_version'].to_f < 7.0 || node['platform'] == 'amazon'
reload_command '/sbin/service httpd graceful'
end |
@svanzoest would that work? I thought chef only recognizes one provider per platform (chef/chef#1717). I think we would still have to override it if we wanted to use systemd. |
I'm not sure if this was implemented yet either, but this could also potentially fix this problem. |
@drpebcak It was added in chef 12 and chef-client 3.8.2 (via chef-boneyard/chef-client#190) |
Do you think we could let newer chef releases pick the provider automatically, but hard code it in some places for backwards compatibility? I think that'd be the best way to go. |
I guess we can but I do not know what we would hardcode and what it would buy us. This really not a cookbook issue as each cookbook would have the same issue. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
On a minimal CentOS 7 system using just systemd (without initscripts installed) the service setup fails because
/sbin/service
isn't installed. The systemd service definitions on CentOS 7 correctly use thegraceful
command for the reload process.