[chef] Re: delayed execution order error?


Chronological Thread 
  • From: Jesse Campbell < >
  • To: chef < >
  • Subject: [chef] Re: delayed execution order error?
  • Date: Fri, 22 Feb 2013 11:38:11 -0500

From my original thread, I was seeing this when it got to delayed execution.

Should it be "not queuing" a delayed restart action, when the queued thing was already run?

Or are you suggesting that switching to the new notifies :restart, "service[jboss-17]" will fix it?

sam-app004 chef-client[31577]: 1: template[/nas_samcustomer/
clusters/17/sam-app004/configuration/h300000017.properties] sending restart action to service[jboss-17] (delayed)
sam-app004 chef-client[31577]: 1: Processing service[jboss-17] action restart (/var/cache/chef/cookbooks/
sam/providers/jboss7cluster.rb line 23)
sam-app004 chef-client[31577]: 1: service[jboss-17] restarted
sam-app004 chef-client[31577]: 1: template[/nas_samcustomer/clusters/17/sam-app004/configuration/standalone.xmlsource] sending run action to execute[standalone-17] (delayed)
sam-app004 chef-client[31577]: 1: Processing execute[standalone-17] action run (/var/cache/chef/cookbooks/sam/providers/jboss7cluster.rb line 148)
sam-app004 chef-client[31577]: 1: execute[standalone-17] ran successfully
sam-app004 chef-client[31577]: 1: execute[standalone-17] not queuing delayed action restart on service[jboss-17] (delayed), as it's already been queued
sam-app004 chef-client[31577]: 1: Chef Run complete in 137.192547 seconds

the recipe was something like this:

service "jboss-17" do
  action :nothing
end

execute "standalone-17" do
  command "cp /nas_samcustomer/clusters/17/sam-app004/configuration/standalone.xmlsource /nas_samcustomer/clusters/17/sam-app004/configuration/standalone.xml"
  action :nothing
  notifies :restart, resources(:service => "jboss-17")
end

template "/nas_samcustomer/clusters/17/sam-app004/configuration/standalone.xmlsource" do
...
  notifies :stop, resources(:service => "jboss-17"), :immediately
  notifies :run, resources(:execute => "standalone-17")
end



Archive powered by MHonArc 2.6.16.

§