devstructure/blueprint — Issue #116: Resources of type 'link' are included in services as 'cookbook_file' resources, halting Chef
Author: abrookins
Created: 2012-02-27 18:08:48+00:00
State: open

I'm using blueprint 3.4.1-1py2.6 to create a cookbook for Chef 0.10.18 from an Ubuntu 10.04 server to another Ubuntu 10.04 server.

The issue I have is that using `blueprint show --chef {name}` generates a recipe with link resources, e.g.:

link('/etc/apache2/mods-enabled/auth_digest.load') do
group 'root'
owner 'root'
to '../mods-available/auth_digest.load'
end

Which are later used in a service as cookbook_file resources, e.g. (other resources removed for clarity):

service('apache2') do
action [:enable, :start]
subscribes :restart, resources('cookbook_file[/etc/apache2/mods-enabled/auth_digest.load]')
end

Chef dies with this output (let's assume a cookbook named 'blueprint-cookbook'):

user@server:~$ sudo chef-solo -j nodes.json
[Mon, 27 Feb 2012 13:02:50 -0500] INFO: *** Chef 0.10.8 ***
[Mon, 27 Feb 2012 13:02:50 -0500] INFO: Setting the run_list to "blueprint-cookbook" from JSON
[Mon, 27 Feb 2012 13:02:50 -0500] INFO: Run List is [recipe[blueprint-cookbook]]
[Mon, 27 Feb 2012 13:02:50 -0500] INFO: Run List expands to [blueprint-cookbook]
[Mon, 27 Feb 2012 13:02:50 -0500] INFO: Starting Chef Run for server-name
[Mon, 27 Feb 2012 13:02:50 -0500] INFO: Running start handlers
[Mon, 27 Feb 2012 13:02:50 -0500] INFO: Start handlers complete.
[Mon, 27 Feb 2012 13:02:50 -0500] ERROR: Running exception handlers
[Mon, 27 Feb 2012 13:02:50 -0500] ERROR: Exception handlers complete
[Mon, 27 Feb 2012 13:02:50 -0500] FATAL: Stacktrace dumped to /tmp/chef-solo/cache/chef-stacktrace.out
[Mon, 27 Feb 2012 13:02:50 -0500] FATAL: Chef::Exceptions::ResourceNotFound: Cannot find a resource matching cookbook_file[/etc/apache2/mods-enabled/auth_digest.load] (did you define it first?)

This error seems to occur for all "link" resources.