Skip to content

facetdigital/chef_resource_merging

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

According to the discussion on the CHEF-3694 ticket, resource cloning, a technique many official community cookbooks rely on, is being deprecated. As such, you get a lot of warnings like this when using off-the-shelf cookbooks:

[2014-01-24T16:15:55+00:00] WARN: Cloning resource attributes for package[perl] from prior resource (CHEF-3694)
[2014-01-24T16:15:55+00:00] WARN: Previous package[perl]: /tmp/vagrant-chef-1/chef-solo-1/cookbooks/perl/recipes/default.rb:26:in `block in from_file'
[2014-01-24T16:15:55+00:00] WARN: Current  package[perl]: /tmp/vagrant-chef-1/chef-solo-1/cookbooks/iptables/recipes/default.rb:21:in `from_file'

This cookbook monkey-patches Chef to try a new idea...instead of cloning resources, it tries to reuse them and merge their actions together. This circumvents the warning and seems to make all the cookbooks that I am using function properly.

This is not well-tested at this time. It works for the set of community and custom cookbooks we have used it with, which includes a lot of the popular ones. Your Mileage May Vary. See my larger discussion of the issue and the solution discovery on my blog post about this.

About

A Chef Cookbook to help workaround the CHEF-3694 resource cloning warnings by merging resources instead.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages