[chef] Supervisor missing templates


Chronological Thread 
  • From: Liam Kirsher < >
  • To:
  • Subject: [chef] Supervisor missing templates
  • Date: Mon, 21 Jul 2014 18:15:13 -0700
  • Openpgp: id=7011F7B7; url=http://liam.numenet.com/pgp/

Hi --

This is probably due to my own misunderstanding, but a little help would be appreciated.

tldr;
Okay, I specified "supervisor", "= 0.4.2" and it worked! 
So, why doesn't 0.4.10 work, and why doesn't the template show up in the files downloaded to /var/cache/cookbooks/supervisor?

I've got it working now, but I'd like to understand this!

--------------------------------------------------------------------------------------------------------

I am including the supervisor cookbook in a recipe.
berks list shows
 * supervisor (0.4.10)
I have run berks upload.
The management interface show three versions of supervisor
0.4.10
0.4.2
0.4.0


When I converge, I get the error below.

The command itself is fine.  If I execute it by hand on the node
"/home/ubuntu/virtualenv/bin/python /home/ubuntu/virtualenv/current/tools/clientutilities/jobs/job_activity_search.py"
it runs.

Apparently the job is not getting created.  The template is missing:
ls /var/chef/cache/cookbooks/supervisor/templates/*
/var/chef/cache/cookbooks/supervisor/templates/default:
supervisord.conf.erb

/var/chef/cache/cookbooks/supervisor/templates/ubuntu:
supervisor.default.erb  supervisor.init.erb
Yet when I look at the content of the 0.4.10 supervisor cookbook (at manage.opscode.com) I see the templates directory contains:
supervisor.default.erb
supervisor.init.erb
fcgi.conf.erb
group.conf.erb
program.conf.erb
supervisord.conf.erb
manifest.xml.erb
supervisor.default.erb
supervisor.init.erb


 * supervisor_service[job_activity_search] action restart
================================================================================
Error executing action `restart` on resource 'supervisor_service[job_activity_search]'
================================================================================


RuntimeError
------------
Supervisor service job_activity_search cannot be restarted because it does not exist


Cookbook Trace:
---------------
/var/chef/cache/cookbooks/supervisor/providers/service.rb:72:in `block in class_from_file'


Resource Declaration:
---------------------
# In /var/chef/cache/cookbooks/bti_main/recipes/default.rb

108:   supervisor_service "#{job}" do
109:     command "#{virtual_env_dir}/bin/python #{virtual_env_dir}/#{jobs_path}/#{job}.py"
110:     process_name "#{job}-%(process_num)s"
111:     action [:enable, :restart]
112:     autostart true
113:     autorestart true
114:     user "root"
115:     numprocs 1
116:   end
117: end



Compiled Resource:
------------------
# Declared in /var/chef/cache/cookbooks/bti_main/recipes/default.rb:108:in `block in from_file'

supervisor_service("job_activity_search") do
  action [:enable, :restart]
  updated true
  retries 0
  retry_delay 2
  cookbook_name "bti_main"
  recipe_name "default"
  command "/home/ubuntu/virtualenv/bin/python /home/ubuntu/virtualenv/current/tools/clientutilities/jobs/job_activity_search.py"
  process_name "job_activity_search-%(process_num)s"
  autostart true
  autorestart true
  user "root"
  numprocs 1
  service_name "job_activity_search"
end

-- 
Liam Kirsher
PGP: http://liam.numenet.com/pgp/



Archive powered by MHonArc 2.6.16.

§