[chef] Chef-client daemon terminates when change interval


Chronological Thread 
  • From: Christine Draper < >
  • To:
  • Subject: [chef] Chef-client daemon terminates when change interval
  • Date: Thu, 6 Nov 2014 18:42:31 -0600

I'm having a problem with a node where chef-client stops running after I change its interval.

It seems this is being caused by the fact that I have a resource being executed after the chef-client is restarted. 

I reproduced the problem with the following:

run_list: chef-client, automateinsights::test

Where test.rb is: 

# Start the service
service "automateinsights" do
  provider Chef::Provider::Service::Upstart
  supports :restart => true, :start => true, :stop => true
  action [:restart]
end

# run the delayed command
execute "after restart" do
  command "echo delayed command"
  action :nothing
  subscribes :run, "service[automateinsights]"
end

Any change to chef_client.interval causes the chef-client daemon to terminate.

Any suggestions for how I can avoid this problem?  What the runlist is actually doing is deploying an application, restarting the service, and then running some automated regression tests on it (the delayed command). 

Thanks!
Christine




Archive powered by MHonArc 2.6.16.

§