Chef-client cookbook issues - totally does not work

Hi,

This happend with chef-client. This is a cookbook form opscode. Why does
this happen of the first run? If I run chef-client again this all is well.

There are my overrides b my run_list override_attributes “chef_client” => {
“init_style” => “runit”, “interval” => “1000” }

Recipe: chef-client::runit_service

  • service[chef-client] action restart[2013-11-01T10:06:25+00:00] INFO:
    Processing service[chef-client] action restart (chef-client::runit_service
    line 147)

================================================================================
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 22552) 9s, 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-11-01T10:06:33+00:00] ERROR: Running exception handlers
[2013-11-01T10:06:33+00:00] ERROR: Creating JSON exception report
[2013-11-01T10:06:33+00:00] ERROR: Exception handlers complete
[2013-11-01T10:06:33+00:00] FATAL: Stacktrace dumped to
/var/chef/cache/chef-stacktrace.out
Chef Client failed. 19 resources updated
[2013-11-01T10:06:33+00:00] FATAL: Chef::Exceptions::ChildConvergeError:
Chef run process exited unsuccessfully (exit code 1)

On Friday, November 1, 2013 at 3:12 AM, David Montgomery wrote:

Hi,

This happend with chef-client. This is a cookbook form opscode. Why does this happen of the first run? If I run chef-client again this all is well.

There are my overrides b my run_list override_attributes "chef_client" => { "init_style" => "runit", "interval" => "1000" }
What’s in the runit logs for the service? runit pipes all output from a command to a logger, where the logs end up depends on your config, so you’ll have to look at that to find them.

--
Daniel DeLeo

Where to I find the logs? people at chef..do you have any comments? This
is your cookbook..........and qudl be great if your can provide guidance.

On the second run after the fail it works. But..a send run is nit good for
me since I have automated scripts that boot.

Thanks

On Sat, Nov 2, 2013 at 2:01 AM, Daniel DeLeo dan@kallistec.com wrote:

On Friday, November 1, 2013 at 3:12 AM, David Montgomery wrote:

Hi,

This happend with chef-client. This is a cookbook form opscode. Why does
this happen of the first run? If I run chef-client again this all is well.

There are my overrides b my run_list override_attributes "chef_client" =>
{ "init_style" => "runit", "interval" => "1000" }

What’s in the runit logs for the service? runit pipes all output from a
command to a logger, where the logs end up depends on your config, so
you’ll have to look at that to find them.

--
Daniel DeLeo