After upgrading the recipe from 0.4.4, the service file is not created. Reverting to 0.4.2 works.
supervisor_service("spider") do
action [:enable, :start]
updated true
retries 0
retry_delay 2
cookbook_name "spider"
recipe_name "default"
user "spider"
directory "/var/lib/spider"
numprocs_start 1
environment {:HOME=>"/var/lib/spider", :USER=>"spider", :SENTRY_DSN=>"https://bcc9163c83ce42a99ca79d7c4b5628ea:[email protected]/2", :GHOSTERY_BUGS=>"/var/lib/spider/.ghostery.bugs", :SCRAPY_PROJECT=>"tarsier", :SCRAPY_SETTINGS_MODULE=>"tarsier.settings", :SCRAPY_AMQP_URL=>"amqp://spider:[email protected]/nitidum", :SCRAPY_HYPERTABLE_HOST=>"localhost", :SCRAPY_MONGO_HOST=>"localhost", :SCRAPY_HTTPCACHE_ENABLED=>"0"}
command "/usr/share/spider/bin/scrapy distributed --id %(process_num)d"
process_name "%(process_num)d"
stopwaitsecs 180
service_name "spider"
end
================================================================================
Error executing action `start` on resource 'supervisor_service[spider]'
================================================================================
RuntimeError
------------
Supervisor service spider cannot be started because it does not exist
Cookbook Trace:
---------------
/var/chef/cache/cookbooks/supervisor/providers/service.rb:40:in `block in class_from_file'
Resource Declaration:
---------------------
# In /var/chef/cache/cookbooks/spider/recipes/default.rb
111: supervisor_service "spider" do
112: action [:enable, :start]
113: autostart false
114: autorestart false
115: user node[:spider][:user]
116: directory node[:spider][:home]
117: numprocs_start 1
118: environment({
119: :HOME => node[:spider][:home],
120: :USER => node[:spider][:user],
121:
122: :SENTRY_DSN => node[:spider][:sentry_url],
123: :GHOSTERY_BUGS => node[:spider][:ghostery_cache],
124:
125: :SCRAPY_PROJECT => "tarsier",
126: :SCRAPY_SETTINGS_MODULE => "tarsier.settings",
127:
128: :SCRAPY_AMQP_URL => rabbitmq_server,
129: :SCRAPY_HYPERTABLE_HOST => node[:spider][:hypertable_host],
130: :SCRAPY_MONGO_HOST => node[:spider][:mongo_host],
131: :SCRAPY_HTTPCACHE_ENABLED => node[:spider][:crawler_cache],
132:
133: #:SCRAPY_MODE => "development",
134: })
135: command "#{node[:spider][:command]} distributed --id %(process_num)d"
136: process_name "%(process_num)d"
137: stopwaitsecs node[:spider][:crawler_stopwaitsecs]
138: end
139:
Compiled Resource:
------------------
# Declared in /var/chef/cache/cookbooks/spider/recipes/default.rb:111:in `from_file'
supervisor_service("spider") do
action [:enable, :start]
updated true
retries 0
retry_delay 2
cookbook_name "spider"
recipe_name "default"
user "spider"
directory "/var/lib/spider"
numprocs_start 1
environment {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX}
command "/usr/share/spider/bin/scrapy distributed --id %(process_num)d"
process_name "%(process_num)d"
stopwaitsecs 180
service_name "spider"
end
[2013-07-26T04:40:15+10:00] INFO: Running queued delayed notifications before re-raising exception
[2013-07-26T04:40:15+10:00] DEBUG: Re-raising exception: RuntimeError - supervisor_service[spider] (spider::default line 111) had an error: RuntimeError: Supervisor service spider cannot be started because it does not exist
/var/chef/cache/cookbooks/supervisor/providers/service.rb:40:in `block in class_from_file'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/provider/lwrp_base.rb:138:in `instance_eval'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/provider/lwrp_base.rb:138:in `block in action'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/provider.rb:118:in `run_action'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/resource.rb:625:in `run_action'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/runner.rb:49:in `run_action'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/runner.rb:81:in `block (2 levels) in converge'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/runner.rb:81:in `each'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/runner.rb:81:in `block in converge'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/resource_collection.rb:98:in `block in execute_each_resource'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/resource_collection/stepable_iterator.rb:116:in `call'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/resource_collection/stepable_iterator.rb:116:in `call_iterator_block'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/resource_collection/stepable_iterator.rb:85:in `step'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/resource_collection/stepable_iterator.rb:104:in `iterate'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/resource_collection/stepable_iterator.rb:55:in `each_with_index'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/resource_collection.rb:96:in `execute_each_resource'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/runner.rb:80:in `converge'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/client.rb:429:in `converge'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/client.rb:494:in `do_run'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/client.rb:199:in `block in run'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/client.rb:193:in `fork'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/client.rb:193:in `run'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/application.rb:183:in `run_chef_client'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/application/client.rb:302:in `block in run_application'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/application/client.rb:294:in `loop'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/application/client.rb:294:in `run_application'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/application.rb:66:in `run'
/var/lib/gems/1.9.1/gems/chef-11.6.0/bin/chef-client:26:in `<top (required)>'
/usr/local/bin/chef-client:23:in `load'
/usr/local/bin/chef-client:23:in `<main>'
[2013-07-26T04:40:15+10:00] ERROR: Running exception handlers
[2013-07-26T04:40:15+10:00] ERROR: Exception handlers complete
[2013-07-26T04:40:15+10:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2013-07-26T04:40:15+10:00] DEBUG: RuntimeError: supervisor_service[spider] (spider::default line 111) had an error: RuntimeError: Supervisor service spider cannot be started because it does not exist
/var/chef/cache/cookbooks/supervisor/providers/service.rb:40:in `block in class_from_file'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/provider/lwrp_base.rb:138:in `instance_eval'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/provider/lwrp_base.rb:138:in `block in action'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/provider.rb:118:in `run_action'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/resource.rb:625:in `run_action'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/runner.rb:49:in `run_action'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/runner.rb:81:in `block (2 levels) in converge'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/runner.rb:81:in `each'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/runner.rb:81:in `block in converge'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/resource_collection.rb:98:in `block in execute_each_resource'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/resource_collection/stepable_iterator.rb:116:in `call'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/resource_collection/stepable_iterator.rb:116:in `call_iterator_block'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/resource_collection/stepable_iterator.rb:85:in `step'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/resource_collection/stepable_iterator.rb:104:in `iterate'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/resource_collection/stepable_iterator.rb:55:in `each_with_index'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/resource_collection.rb:96:in `execute_each_resource'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/runner.rb:80:in `converge'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/client.rb:429:in `converge'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/client.rb:494:in `do_run'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/client.rb:199:in `block in run'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/client.rb:193:in `fork'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/client.rb:193:in `run'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/application.rb:183:in `run_chef_client'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/application/client.rb:302:in `block in run_application'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/application/client.rb:294:in `loop'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/application/client.rb:294:in `run_application'
/var/lib/gems/1.9.1/gems/chef-11.6.0/lib/chef/application.rb:66:in `run'
/var/lib/gems/1.9.1/gems/chef-11.6.0/bin/chef-client:26:in `<top (required)>'
/usr/local/bin/chef-client:23:in `load'
/usr/local/bin/chef-client:23:in `<main>'
Chef Client failed. 9 resources updated
[2013-07-26T04:40:15+10:00] DEBUG: Server doesn't support resource history, skipping resource report.
[2013-07-26T04:40:15+10:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)