rackspace-cookbooks/rackspace_monitoring

Template directory not in chef cache

Closed this issue · 4 comments

Hi all,

When running sudo chef-client on my server I receive the following.

Recipe: abc::default
  * rackspace_monitoring_check[CPU] action create
================================================================================
Error executing action `create` on resource 'rackspace_monitoring_check[CPU]'
================================================================================


Errno::ENOENT
-------------
No such file or directory - /var/chef/cache/cookbooks/rackspace_monitoring/libraries/../templates/default/libraries/agent_cpu.erb

Cookbook Trace:
---------------
/var/chef/cache/cookbooks/rackspace_monitoring/libraries/helpers.rb:8:in `read'
/var/chef/cache/cookbooks/rackspace_monitoring/libraries/helpers.rb:8:in `template_criteria'
/var/chef/cache/cookbooks/rackspace_monitoring/libraries/helpers.rb:21:in `alarm_criteria_agent_cpu'
/var/chef/cache/cookbooks/rackspace_monitoring/libraries/helpers.rb:145:in `parsed_alarm_criteria'
/var/chef/cache/cookbooks/rackspace_monitoring/libraries/helpers.rb:166:in `parsed_template_variables'
/var/chef/cache/cookbooks/rackspace_monitoring/libraries/provider_rackspace_monitoring_check.rb:68:in `block in generate_agent_config'
/var/chef/cache/cookbooks/rackspace_monitoring/libraries/provider_rackspace_monitoring_check.rb:62:in `generate_agent_config'
/var/chef/cache/cookbooks/rackspace_monitoring/libraries/provider_rackspace_monitoring_check.rb:19:in `block in <class:RackspaceMonitoringCheck>'


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

106: rackspace_monitoring_check 'CPU' do
107:   alarm false
108:   label 'CPU'
109:   type 'agent.cpu'
110:   action :create
111: end


Compiled Resource:
------------------
# Declared in /var/chef/cache/cookbooks/abc/recipes/default.rb:106:in `from_file'

rackspace_monitoring_check("CPU") do
  action [:create]
  retries 0
  retry_delay 2
  cookbook_name "abc"
  recipe_name "default"
  label "CPU"
  type "agent.cpu"
  cookbook "rackspace_monitoring"
end

The templates directory is not being stored in the chef cache.

ls /var/chef/cache/cookbooks/rackspace_monitoring/
CHANGELOG.md  libraries  metadata.json  README.md  recipes

Any thoughts?

Chef version: 11.4.4
Ubuntu version: 14.04 LTS

Howdy there! Could you let us know versions of Chef you're experiencing this on? We have some tests for this that I think would be catching anything obvious, but I'd love to reproduce it so we can find a fix. Thanks!

Hi @martinb3, forgot to hit the Comment button on my response. We're using Chef version 11.4.4

I've opened a support ticket with Chef just in case it's a problem there.

Hi @james-ai -- Chef 11.4.4 is actually quite old at this point (3 years old, as of Monday), and resources have changed dramatically since then in Chef. We're definitely not testing on these older versions. Is there any chance you could try a newer version of Chef? I'm 99% sure that would fix your issue.

Thanks, @martinb3. That's the version our resident Head Chef was using so I followed his lead.
However, just spoken to him and we're gonna work back from 12.9.38 until we find a version that works for us.

Thanks for getting back me,
James.