Hi Guys,
I am getting below error only when I try to run my custom cookbooks , I am using chef_zero as a provisioner to run the custom cookbooks.
My Question is by default which cache is being used by chef_zero ?
:/var/chef/runs/6f707f6d-7be8-48c7-9670-95062536b4c2/local-mode-cache/cache/cookbooks/chef-splunk/recipes/client.rb:46:in rescue in from_file' : /var/chef/runs/6f707f6d-7be8-48c7-9670-95062536b4c2/local-mode-cache/cache/cookbooks/chef-splunk/recipes/service.rb:103:in
from_file’ (CHEF-3694)/var/chef/runs/6f707f6d-7be8-48c7-9670-95062536b4c2/local-mode-cache/cache/cookbooks/chef-splunk/recipes/service.rb:103:in from_file'. Please see https://docs.chef.io/deprecations_resource_cloning.html for further details and information on how to correct this problem. at /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.18.31/lib/chef/event_dispatch/dispatcher.rb:43:in
call’
[2017-11-20T15:41:58+00:00] INFO: HTTP Request Returned 404 Not Found: Object not found: chefzero://localhost:8889/data/vault/splunk__default
================================================================================
Recipe Compile Error in /var/chef/runs/6f707f6d-7be8-48c7-9670-95062536b4c2/local-mode-cache/cache/cookbooks/chef-splunk/recipes/default.rb
Net::HTTPServerException
------------------------
404 “Not Found”
Cookbook Trace:
/var/chef/runs/6f707f6d-7be8-48c7-9670-95062536b4c2/local-mode-cache/cache/cookbooks/chef-vault/libraries/helpers.rb:38:in chef_vault_item' /var/chef/runs/6f707f6d-7be8-48c7-9670-95062536b4c2/local-mode-cache/cache/cookbooks/chef-splunk/recipes/setup_auth.rb:21:in
from_file’
/var/chef/runs/6f707f6d-7be8-48c7-9670-95062536b4c2/local-mode-cache/cache/cookbooks/chef-splunk/recipes/client.rb:81:in from_file' /var/chef/runs/6f707f6d-7be8-48c7-9670-95062536b4c2/local-mode-cache/cache/cookbooks/chef-splunk/recipes/default.rb:29:in
from_file’
Relevant File Content:
/var/chef/runs/6f707f6d-7be8-48c7-9670-95062536b4c2/local-mode-cache/cache/cookbooks/chef-vault/libraries/helpers.rb:
31: # +node[‘chef-vault’][‘databag_fallback’]+.
32: # @example
33: # item = chef_vault_item(‘secrets’, ‘bacon’)
34: # log ‘Yeah buddy!’ if item[’_default’][‘type’]
35: # @param [String] bag Name of the data bag to load from.
36: # @param [String] id Identifier of the data bag item to load.
37: def chef_vault_item(bag, id)
38>> if ChefVault::Item.vault?(bag, id)
39: ChefVault::Item.load(bag, id)
40: elsif node[‘chef-vault’][‘databag_fallback’]
41: data_bag_item(bag, id)
42: else
43: raise "Trying to load a regular data bag item #{id} from #{bag}, and databag_fallback is disabled"
44: end
45: end
46:
47: # Helper method which provides an environment wrapper for a data bag.
Platform:
x86_64-linux
[2017-11-20T15:41:58+00:00] ERROR: Running exception handlers
[2017-11-20T15:41:58+00:00] ERROR: Exception handlers complete
[2017-11-20T15:41:58+00:00] FATAL: Stacktrace dumped to /var/chef/runs/6f707f6d-7be8-48c7-9670-95062536b4c2/local-mode-cache/cache/chef-stacktrace.out
[2017-11-20T15:41:58+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2017-11-20T15:41:58+00:00] ERROR: 404 “Not Found”
[2017-11-20T15:41:58+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)