chef-boneyard / push-jobs-cookbook

Development repository for Chef Cookbook push-jobs
https://supermarket.chef.io/cookbooks/push-jobs
Apache License 2.0
21 stars 43 forks source link

/sbin/sv not installed. Runit package missing as dependency ? #97

Closed thechile closed 7 years ago

thechile commented 8 years ago

I setup push-jobs per the instructions but after changing the node runlist to include push-jobs it fails with below error. Seems that the runit package isn't installed as a dependency ?

I can't see this mentioned in the documentation ? Is there some steps i missed to use the push-job client on Centos servers ?

Info

rpm -qa |grep chef
chef-12.13.37-1.el6.x86_64

cat /etc/redhat-release
CentOS release 6.7 (Final)

Error

restart_command "/sbin/sv restart /etc/service/chef-push-jobs-client"
  Platform:
  ---------
  x86_64-linux

    ================================================================================
    Error executing action `restart` on resource 'push_jobs_service_runit[push-jobs]'
    ================================================================================

    RuntimeError
    ------------
    runit_service[chef-push-jobs-client] (/var/cache/chef/cookbooks/push-jobs/resources/service_runit.rb line 43) had an error: RuntimeError: Could not locate main runit sv_bin at "/sbin/sv". Did you remember to install runit before declaring a "runit_service" resource?

    Try adding the following to the top of your recipe:

    include_recipe "runit"

    Cookbook Trace:
    ---------------
    /var/cache/chef/cookbooks/runit/libraries/provider_runit_service.rb:69:in `load_current_resource'
    /var/cache/chef/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/provider.rb:133:in `compile_and_converge_action'

    Resource Declaration:
    ---------------------
    # In /var/cache/chef/cookbooks/push-jobs/recipes/service.rb

     29:   push_jobs_service 'push-jobs' do
     30:     action [:start, :enable]
     31:     subscribes :restart, "template[#{PushJobsHelper.config_path}]"
     32:   end
     33: end

    Compiled Resource:
    ------------------
    # Declared in /var/cache/chef/cookbooks/push-jobs/recipes/service.rb:29:in `from_file'

    push_jobs_service_runit("push-jobs") do
      action [:start, :enable]
      retries 0
      retry_delay 2
      default_guard_interpreter :default
      declared_type :push_jobs_service
      cookbook_name "push-jobs"
      recipe_name "service"
    end

    Platform:
    ---------
    x86_64-linux
izghitu commented 8 years ago

for some reason the runit package is not being installed, try running:

rpm -q runit
yum install runit

and see what you get

tas50 commented 7 years ago

Closing this out since we haven't heard back from the user. Make sure that runit is being installed on the node as that seems like the root cause.