Open Ryuzavi opened 5 years ago
Thanks for opening this issue @Ryuzavi ! First question: how do you handle cookbook dependencies normally? Do you use Berkshelf? IE, cw_default
has a dependency on run-test
- do you normally use Berkshelf to look up that dependency and manage versions of it? Or do you use something else?
Yeah I actually use Berks manually, via berks vendor
. I usually do this before I try anything chef (except for kitchen) and do so in this case.
I don't believe I'm explicitly referencing cw_default
or run-test
directly in my stack as well. It may be a dependent cookbook is I guess?
This issue is still outstanding. Chef-run seems to fail with any local cookbook dependencies.
chef-run fails if a local cookbook is used, but policyfiles work as expected. Dependencies are okay if they're on the supermarket, but not local.
PS C:\Windows\system32> chef -v
Chef Workstation version: 0.17.5
Chef Infra Client version: 15.8.23
Chef InSpec version: 4.18.100
Chef CLI version: 2.0.0
Test Kitchen version: 2.4.0
Cookstyle version: 5.22.6
Description
Asked about this issue initially on Chef Slack and was asked to raise an issue here.
I'm trying to run local cookbooks on a remote server with chef-run but it's failing. The issue seems to be dependency related as the chef-run process doesn't appear to be uploading any cookbooks \ recipes \ etc outside of the main recipe (in this case default).
On the remote machine it's created a recipe called
cw_recipe
that contains the default recipe of the cookbook I'm trying to run but nothing else. So the converge fails straight away as the default recipe attempts to call another recipe in the same cookbook but under the original name.So pretty weird. I suspect the issue may be that my cookbooks have metadata stored in json format as metadata is mentioned in the stack trace. We also use Berks as the resolver.
Chef Apply Version
Platform Version
CentOS Linux release 7.5.1804 (Core)
Replication Case
I guess the recreation is to create a cookbook with metadata stored in json format that has 2 recipes, default and another, and default calls the other through an
include_recipe
call?Outside of that our cookbooks are standard affair. This is for my company so I can't upload the cookbooks sadly.
Client Output
Stacktrace