-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
upload failed for cookbooks/audit because missing "compat_resource" #204
Comments
Hello, @benlu36. This is expected behavior. There are two ways to solve this:
I would recommend using Berkshelf as it will make sure the right versions of the right dependency cookbooks are downloaded and then uploaded to your Chef Server. From the I hope this helps! ~Adam |
Thanks, @adamleff ! pwd/root/chef-repo/chef-cookbooks/audit berks installW, [2017-03-31T14:12:59.449649 #6460] WARN -- : You are setting a key that conflicts with a built-in method Hashie::Mash#frozen? defined in Kernel. This can cause unexpected behavior when accessing the key via as a property. You can still access the key via the #[] method. |
Yeah, that a lot of warnings you can ignore - that's fixed in the upcoming ChefDK release. So, you ran |
berks upload -- > works, it uploaded all cookbooks to chef server.Thanks, @adamleff ! |
Hi, It looks like you might be new to Chef. The problem you are seeing is that knife cookbook upload is expecting that all dependencies of the cookbook are handled. You can't upload a cookbook to the Chef Server without uploading its dependencies. This isn't a problem specific to this cookbook, it's something that you need to understand and deal with for any cookbook that you use. The metadata.rb file will indicate what dependencies there are. You can either manually handle the dependencies by downloading them from the supermarket and uploading them, or you can use a tool like berkshelf to handle the dependencies. If you look at the Berksfile that is included you'll see that it will pull from the public supermarket https://supermarket.chef.io. Oops. I started to respond to this earlier, and just got back to it. Just realized that @adamleff has already answered more thoroughly! Thanks @adamleff! |
High-five, @iennae 🙂 |
knife cookbook upload audit -o ./chef-cookbooks
Uploading audit [2.4.0]
ERROR: Cookbook audit depends on cookbooks which are not currently
ERROR: being uploaded and cannot be found on the server.
ERROR: The missing cookbook(s) are: 'compat_resource' version '>= 0.0.0'
Cookbook version
audit [2.4.0]
Chef-client version
Chef Development Kit Version: 1.2.22
chef-client version: 12.18.31
kitchen version: 1.15.0
Platform Details
Red Hat Enterprise Linux Server release 7.0 (Maipo)
Scenario:
[What you are trying to achieve and you can't?]
knife cookbook upload audit -o ./chef-cookbooks
...
ERROR: Cookbook audit depends on cookbooks which are not currently
ERROR: being uploaded and cannot be found on the server.
ERROR: The missing cookbook(s) are: 'compat_resource' version '>= 0.0.0'
Steps to Reproduce:
as above
Expected Result:
upload with no error, or to have updated 'compat_resource' version in the cookbook audit
Actual Result:
Failed as "ERROR: The missing cookbook(s) are: 'compat_resource' version '>= 0.0.0' "
The text was updated successfully, but these errors were encountered: