sous-chefs / chef-splunk

Development repository for the chef-splunk cookbook
https://supermarket.chef.io/cookbooks/chef-splunk
Apache License 2.0
75 stars 122 forks source link

Cloning resource #99

Closed ludusregio closed 7 years ago

ludusregio commented 7 years ago

Cookbook version

chef-splunk 1.7.0

Chef-client version

chef-client --version Chef: 12.20.3

Platform Details

CentOS Linux release 7.3.1611 (Core)

Scenario:

chef-client report:

Cloning resource attributes for service[splunk] from prior resource Previous service[splunk]: /var/chef/cache/cookbooks/chef-splunk/recipes/client.rb:46:in rescue in from_file' Current service[splunk]: /var/chef/cache/cookbooks/chef-splunk/recipes/service.rb:88:infrom_file' at 1 location:

tas50 commented 7 years ago

This deprecation warning was a hard one and often false alerts. The cookbook actually runs in Chef 13 so I'm going to close this out.

haidangwa commented 6 years ago

@tas50 The service['splunk'] resource is indeed being cloned in this cookbook. It's first declared in the client recipe (https://github.com/chef-cookbooks/chef-splunk/blob/master/recipes/client.rb#L46), then re-declared in the service recipe (https://github.com/chef-cookbooks/chef-splunk/blob/master/recipes/service.rb#L88 or https://github.com/chef-cookbooks/chef-splunk/blob/master/recipes/service.rb#L103). We have a cookbook that wraps chef-splunk, and to workaround this problem, a third service['splunk'] resource can be declared. However, this takes cloning resources to a ridiculous level.