Why does the the chef-client cookbook build by opscode does not work on occasion>?


#1

I am using chef-client

Here are my overides in a run list
override_attributes “chef_client” => { “init_style” => “runit”, “interval”
=> “1000” },

So…what is the issue with chef-client?

[2013-10-04T22:53:08+00:00] DEBUG: service[chef-client] you have specified
a status command, running…
[2013-10-04T22:53:08+00:00] DEBUG: service[chef-client] is running

================================================================================
Error executing action restart on resource ‘service[chef-client]’

Mixlib::ShellOut::ShellCommandFailed

Expected process to exit with [0], but received ‘1’
---- Begin output of /usr/bin/chpst -u root /usr/bin/sv restart
/etc/service/chef-client ----
STDOUT: timeout: run: /etc/service/chef-client: (pid 25496) 27s, got TERM
STDERR:
---- End output of /usr/bin/chpst -u root /usr/bin/sv restart
/etc/service/chef-client ----
Ran /usr/bin/chpst -u root /usr/bin/sv restart /etc/service/chef-client
returned 1

Resource Declaration:

In /var/chef/cache/cookbooks/runit/definitions/runit_service.rb

147: service params[:name] do
148: control_cmd = node[:runit][:sv_bin]
149: if params[:owner]
150: control_cmd = "#{node[:runit][:chpst_bin]} -u #{params[:owner]}
#{control_cmd}"
151: end
152: provider Chef::Provider::Service::Init

Compiled Resource:

Declared in

/var/chef/cache/cookbooks/runit/definitions/runit_service.rb:147:in `block
in from_file’

service(“chef-client”) do
params {:directory=>"/etc/sv", :only_if=>false, :finish_script=>false,
:control=>[], :run_restart=>true, :active_directory=>"/etc/service",
:owner=>“root”, :group=>“root”, :template_name=>“chef-client”,
:log_template_name=>“chef-client”, :control_template_names=>{},
:finish_script_template_name=>“chef-client”, :start_command=>“start”,
:stop_command=>“stop”, :restart_command=>“restart”,
:status_command=>“status”, :options=>{}, :env=>{}, :name=>“chef-client”}
provider Chef::Provider::Service::Init
action [:nothing]
supports {:restart=>true, :status=>true}
retries 0
retry_delay 2
service_name "chef-client"
pattern "chef-client"
start_command "/usr/bin/chpst -u root /usr/bin/sv start
/etc/service/chef-client"
stop_command "/usr/bin/chpst -u root /usr/bin/sv stop
/etc/service/chef-client"
status_command "/usr/bin/chpst -u root /usr/bin/sv status
/etc/service/chef-client"
restart_command "/usr/bin/chpst -u root /usr/bin/sv restart
/etc/service/chef-client"
startup_type :automatic
cookbook_name "chef-client"
recipe_name "runit_service"
end

[2013-10-04T22:53:16+00:00] DEBUG: Re-raising exception:
Mixlib::ShellOut::ShellCommandFailed - service[chef-client]
(chef-client::runit_service line 147) had an error:
Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0],
but received ‘1’
---- Begin output of /usr/bin/chpst -u root /usr/bin/sv restart
/etc/service/chef-client ----
STDOUT: timeout: run: /etc/service/chef-client: (pid 25496) 27s, got TERM
STDERR:
---- End output of /usr/bin/chpst -u root /usr/bin/sv restart
/etc/service/chef-client ----
Ran /usr/bin/chpst -u root /usr/bin/sv restart /etc/service/chef-client
returned 1
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/mixlib-shellout-1.2.0/lib/mixlib/shellout.rb:251:in
`invalid!’

/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/mixlib-shellout-1.2.0/lib/mixlib/shellout.rb:237:in
`error!’

/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/mixin/shell_out.rb:36:in
`shell_out!’

/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/provider/service/simple.rb:97:in
`restart_service’

/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/provider/service/init.rb:69:in
`restart_service’

/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/provider/service.rb:115:in
`block in action_restart’

/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/mixin/why_run.rb:52:in
`call’

/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/mixin/why_run.rb:52:in
`add_action’

/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/provider.rb:149:in
`converge_by’

/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/provider/service.rb:114:in
`action_restart’

/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/provider.rb:114:in
`run_action’

/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/resource.rb:625:in
`run_action’

/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/runner.rb:49:in
`run_action’

/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/runner.rb:111:in
`run_delayed_notification’

/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/runner.rb:99:in
`block in run_delayed_notifications’

/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/runner.rb:98:in
`each’

/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/runner.rb:98:in
`run_delayed_notifications’

/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/runner.rb:88:in
`converge’

/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/client.rb:429:in
`converge’

/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/client.rb:494:in
`do_run’

/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/client.rb:199:in
`block in run’

/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/client.rb:193:in
`fork’

/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/client.rb:193:in
`run’

/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/application.rb:183:in
`run_chef_client’

/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/application/client.rb:302:in
`block in run_application’

/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/application/client.rb:294:in
`loop’

/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/application/client.rb:294:in
`run_application’

/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/application.rb:66:in
`run’

/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/bin/chef-client:26:in
<top (required)>' /usr/bin/chef-client:23:inload’
/usr/bin/chef-client:23:in <main>' [2013-10-04T22:53:16+00:00] ERROR: Running exception handlers [2013-10-04T22:53:16+00:00] ERROR: Creating JSON exception report [2013-10-04T22:53:16+00:00] ERROR: Exception handlers complete [2013-10-04T22:53:16+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out [2013-10-04T22:53:16+00:00] DEBUG: Mixlib::ShellOut::ShellCommandFailed: service[chef-client] (chef-client::runit_service line 147) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1' ---- Begin output of /usr/bin/chpst -u root /usr/bin/sv restart /etc/service/chef-client ---- STDOUT: timeout: run: /etc/service/chef-client: (pid 25496) 27s, got TERM STDERR: ---- End output of /usr/bin/chpst -u root /usr/bin/sv restart /etc/service/chef-client ---- Ran /usr/bin/chpst -u root /usr/bin/sv restart /etc/service/chef-client returned 1 /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/mixlib-shellout-1.2.0/lib/mixlib/shellout.rb:251:ininvalid!’
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/mixlib-shellout-1.2.0/lib/mixlib/shellout.rb:237:in
error!' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/mixin/shell_out.rb:36:inshell_out!’
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/provider/service/simple.rb:97:in
restart_service' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/provider/service/init.rb:69:inrestart_service’
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/provider/service.rb:115:in
block in action_restart' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/mixin/why_run.rb:52:incall’
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/mixin/why_run.rb:52:in
add_action' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/provider.rb:149:inconverge_by’
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/provider/service.rb:114:in
action_restart' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/provider.rb:114:inrun_action’
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/resource.rb:625:in
run_action' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/runner.rb:49:inrun_action’
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/runner.rb:111:in
run_delayed_notification' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/runner.rb:99:inblock in run_delayed_notifications’
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/runner.rb:98:in
each' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/runner.rb:98:inrun_delayed_notifications’
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/runner.rb:88:in
converge' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/client.rb:429:inconverge’
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/client.rb:494:in
do_run' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/client.rb:199:inblock in run’
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/client.rb:193:in
fork' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/client.rb:193:inrun’
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/application.rb:183:in
run_chef_client' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/application/client.rb:302:inblock in run_application’
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/application/client.rb:294:in
loop' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/application/client.rb:294:inrun_application’
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/application.rb:66:in
run' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/bin/chef-client:26:in<top (required)>’
/usr/bin/chef-client:23:in load' /usr/bin/chef-client:23:in'
[2013-10-04T22:53:16+00:00] DEBUG: Server doesn’t support resource history,
skipping resource report.
[2013-10-04T22:53:16+00:00] FATAL: Chef::Exceptions::ChildConvergeError:
Chef run process exited unsuccessfully (exit code 1)