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

Ubuntu 15 fails because /sbin/status is not found #60

Closed
Paladin opened this issue Jun 10, 2015 · 5 comments
Closed

Ubuntu 15 fails because /sbin/status is not found #60

Paladin opened this issue Jun 10, 2015 · 5 comments

Comments

@Paladin
Copy link

Paladin commented Jun 10, 2015

Not sure if this is rightly here or in chef's Upstart code, but using

$> chef -v
Chef Development Kit Version: 0.6.0
chef-client version: 12.3.0
berks version: 3.2.4
ckitchen version: 1.4.0

and openssh cookbook 1.4.0

to build ubuntu 15.04 server I get an error:

     * service[ssh] action enable

       ================================================================================
       Error executing action `enable` on resource 'service[ssh]'
       ================================================================================

       Errno::ENOENT
       -------------
       No such file or directory - /sbin/status

None of those files (enable, restart, status) exist in /sbin in the 15.04 image I'm building from. The same cookbook in the same environment builds 14.04 just fine. (and while there is no /sbin/status the command "service ssh status" works.

@Paladin
Copy link
Author

Paladin commented Jun 10, 2015

A follow up with some more information. Falling back to version 1.3.0 of this cookbook seems to work well in Ubuntu 15 (can log in and the config file is correct) as well as Ubuntu 14.

@adepue
Copy link

adepue commented Jun 23, 2015

@Paladin This should be resolved here:
#62

@tas50
Copy link
Contributor

tas50 commented Jun 24, 2015

This should be fixed in the 1.5.0 release

@dmigous
Copy link

dmigous commented Jun 14, 2018

Same issue systemd/upstart change at debian:stretch.

@dmigous
Copy link

dmigous commented Jun 14, 2018

I think adding smth like

if  'debian' == node['platform']
  if Chef::VersionConstraint.new('>= 9').include?(node['platform_version'])
    service_provider = Chef::Provider::Service::Upstart
  else
    service_provider = Chef::Provider::Service::Systemd
  end
end

here: https://github.com/adepue/openssh/blob/ee32e90bc66d94a22b0ff82814e49d8d1b3d931e/recipes/default.rb#L69

will resolve issue

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

No branches or pull requests

4 participants