{"action":"created","issue":{"url":"https://api.github.com/repos/chef/chef/issues/3593","labels_url":"https://api.github.com/repos/chef/chef/issues/3593/labels{/name}","comments_url":"https://api.github.com/repos/chef/chef/issues/3593/comments","events_url":"https://api.github.com/repos/chef/chef/issues/3593/events","html_url":"https://github.com/chef/chef/issues/3593","id":91035956,"number":3593,"title":"chef-client 12.4.0 wrongly detects sysvinit instead of systemd on CentOS 7","user":{"login":"ameir","id":374330,"avatar_url":"https://avatars.githubusercontent.com/u/374330?v=3","gravatar_id":"","url":"https://api.github.com/users/ameir","html_url":"https://github.com/ameir","followers_url":"https://api.github.com/users/ameir/followers","following_url":"https://api.github.com/users/ameir/following{/other_user}","gists_url":"https://api.github.com/users/ameir/gists{/gist_id}","starred_url":"https://api.github.com/users/ameir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ameir/subscriptions","organizations_url":"https://api.github.com/users/ameir/orgs","repos_url":"https://api.github.com/users/ameir/repos","events_url":"https://api.github.com/users/ameir/events{/privacy}","received_events_url":"https://api.github.com/users/ameir/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-06-25T18:08:58Z","updated_at":"2015-06-25T19:49:22Z","closed_at":null,"body":"I was running the httpd cookbook, which has previously worked just fine.  Today, though, it wasn't.  I thought that someone overwrote a version with bad changes, but I tried the fresh cookbook version from GitHub just to be safe, and had the same issues.  I downgraded from chef-client 12.4.0 to 12.2.1 and things began to work just fine.  In short, it looks like Ohai or whatever does the init system detection is being thrown off somewhere.  Here's a snippet of the logs; I have the entire debug log if needed.\r\n\r\n```\r\n10.98.193.143     * template[default :create /etc/init.d/httpd-default] action create[2015-06-25T17:53:59+00:00] INFO: Processing template[default :create /etc/init.d/httpd-default] action create (/var/c\r\nhef/cache/cookbooks/httpd/libraries/provider_httpd_service_rhel_sysvinit.rb line 27)\r\n10.98.193.143 [2015-06-25T17:53:59+00:00] DEBUG: Providers for generic template resource enabled on node include: [Chef::Provider::Template]\r\n10.98.193.143 [2015-06-25T17:53:59+00:00] DEBUG: Provider for action create on resource template[default :create /etc/init.d/httpd-default] is Chef::Provider::Template\r\n10.98.193.143\r\n10.98.193.143       ESC[0m\r\n10.98.193.143       ================================================================================ESC[0m\r\n10.98.193.143       ESC[31mError executing action `create` on resource 'template[default :create /etc/init.d/httpd-default]'ESC[0m\r\n10.98.193.143       ================================================================================ESC[0m\r\n10.98.193.143\r\n10.98.193.143 ESC[0m      Chef::Exceptions::FileNotFoundESC[0m\r\n10.98.193.143       ------------------------------ESC[0m\r\n10.98.193.143       Cookbook 'httpd' (0.2.14) does not contain a file at any of these locations:\r\n10.98.193.143 ESC[0m        templates/centos-7.1.1503/2.4/sysvinit/el-7/httpd.erb\r\n10.98.193.143 ESC[0m        templates/centos/2.4/sysvinit/el-7/httpd.erb\r\n10.98.193.143 ESC[0m        templates/default/2.4/sysvinit/el-7/httpd.erb\r\n10.98.193.143 ESC[0m        templates/2.4/sysvinit/el-7/httpd.erb\r\n10.98.193.143 ESC[0m\r\n10.98.193.143 ESC[0m      This cookbook _does_ contain: ['/var/chef/cache/cookbooks/httpd/templates/default/2.2/mods/mpm.conf.erb','/var/chef/cache/cookbooks/httpd/templates/default/2.2/scripts/a2enmod.e\r\nrb','/var/chef/cache/cookbooks/httpd/templates/default/2.2/sysvinit/debian-7/apache2.erb','/var/chef/cache/cookbooks/httpd/templates/default/2.2/sysvinit/el-5/httpd.erb','/var/chef/cache/cookbooks/httpd/\r\ntemplates/default/2.2/sysvinit/el-6/httpd.erb','/var/chef/cache/cookbooks/httpd/templates/default/2.2/sysvinit/ubuntu-10.04/apache2.erb','/var/chef/cache/cookbooks/httpd/templates/default/2.2/sysvinit/ub\r\nuntu-12.04/apache2.erb','/var/chef/cache/cookbooks/httpd/templates/default/2.4/mods/rhel/mpm.conf.erb','/var/chef/cache/cookbooks/httpd/templates/default/2.4/scripts/a2enmod.erb','/var/chef/cache/cookboo\r\nks/httpd/templates/default/2.4/sysvinit/el-6/httpd.erb','/var/chef/cache/cookbooks/httpd/templates/default/2.4/sysvinit/ubuntu-14.04/apache2.erb','/var/chef/cache/cookbooks/httpd/templates/default/envvar\r\ns.erb','/var/chef/cache/cookbooks/httpd/templates/default/httpd.conf.erb','/var/chef/cache/cookbooks/httpd/templates/default/magic.erb','/var/chef/cache/cookbooks/httpd/templates/default/module_load.erb'\r\n,'/var/chef/cache/cookbooks/httpd/templates/default/mpm.conf.erb','/var/chef/cache/cookbooks/httpd/templates/default/rhel/sysconfig/httpd-2.2.erb','/var/chef/cache/cookbooks/httpd/templates/default/rhel/\r\nsysconfig/httpd-2.4.erb','/var/chef/cache/cookbooks/httpd/templates/default/systemd/httpd.service.erb']ESC[0m\r\n10.98.193.143\r\n10.98.193.143 ESC[0m      Resource Declaration:ESC[0m\r\n10.98.193.143       ---------------------ESC[0m\r\n10.98.193.143       # In /var/chef/cache/cookbooks/httpd/libraries/provider_httpd_service_rhel_sysvinit.rb\r\n10.98.193.143 ESC[0m\r\n10.98.193.143 ESC[0m       27:             template \"#{new_resource.name} :create /etc/init.d/#{apache_name}\" do\r\n10.98.193.143 ESC[0m       28:               path \"/etc/init.d/#{apache_name}\"\r\n10.98.193.143 ESC[0m       29:               source \"#{parsed_version}/sysvinit/el-#{elversion}/httpd.erb\"\r\n10.98.193.143 ESC[0m       30:               owner 'root'\r\n10.98.193.143 ESC[0m       31:               group 'root'\r\n10.98.193.143 ESC[0m       32:               mode '0755'\r\n10.98.193.143 ESC[0m       33:               variables(apache_name: apache_name)\r\n10.98.193.143 ESC[0m       34:               cookbook 'httpd'\r\n10.98.193.143 ESC[0m       35:               action :create\r\n10.98.193.143 ESC[0m       36:             end\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/chef/chef/issues/comments/115375380","html_url":"https://github.com/chef/chef/issues/3593#issuecomment-115375380","issue_url":"https://api.github.com/repos/chef/chef/issues/3593","id":115375380,"user":{"login":"btm","id":4381,"avatar_url":"https://avatars.githubusercontent.com/u/4381?v=3","gravatar_id":"","url":"https://api.github.com/users/btm","html_url":"https://github.com/btm","followers_url":"https://api.github.com/users/btm/followers","following_url":"https://api.github.com/users/btm/following{/other_user}","gists_url":"https://api.github.com/users/btm/gists{/gist_id}","starred_url":"https://api.github.com/users/btm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/btm/subscriptions","organizations_url":"https://api.github.com/users/btm/orgs","repos_url":"https://api.github.com/users/btm/repos","events_url":"https://api.github.com/users/btm/events{/privacy}","received_events_url":"https://api.github.com/users/btm/received_events","type":"User","site_admin":false},"created_at":"2015-06-25T19:49:22Z","updated_at":"2015-06-25T19:49:22Z","body":"@lamont-granquist there's a comment there that it doesn't use platform_family to avoid amazon (https://github.com/chef/chef-rfc/pull/109)\r\n\r\n@someara and @jdmundrawala are replicating the issue now to determine the best place for a fix."}}