Open m1ndful opened 10 years ago
All of these can be fixed by commenting one line in solo.rb and running chef-solo locally $ sudo chef-solo -c solo.rb -j dna.json
node_name "10.1.1.1"
base = File.expand_path('..', __FILE__)
nodes_path File.join(base, 'nodes')
role_path File.join(base, 'roles')
data_bag_path File.join(base, 'data_bags')
encrypted_data_bag_secret File.join(base, 'data_bag_key')
environment_path File.join(base, 'environments')
environment "_default"
ssl_verify_mode :verify_none
cookbook_path []
cookbook_path << File.join(base, 'cookbooks-1') # /Users/myusername/.chefdk/gem/ruby/2.1.0/gems/knife-solo-0.4.2/lib/knife-solo/resources/patch_cookbooks
cookbook_path << File.join(base, 'cookbooks-2') # /Users/myusername/.berkshelf/knife-solo/2cbcbb32a9140c335af087b9b2f505f5458944a2
#cookbook_path << File.join(base, 'cookbooks-3') # /Users/myusername/zabbix.host/cookbooks
Interesting. Would you be able to post your kitchen to a git repo (or enough of it to cause the problem)? Would probably help diagnosis to be able to reproduce it myself.
Pretty sure cookbooks-3 should be the patch cookbooks. So wondering if we have some sort of interaction between the chef-solo-search and something else you having going on.
Published my kitchen to: https://github.com/m1ndful/knife-solo-kitchen
So reading through the code that sets up cookbook paths and the implementation of add_cookbook_path
which uses unshift, the mapping should be:
cookbooks-1 => knife-solo patches
cookbooks-2 => librarian cookbooks
cookbooks-3 => berkshelf cookbooks
Which your repo agrees with. Do you have a Berksfile
in your local kitchen? Removing that or running the command with --no-berkshelf
should have the same effect as commenting cookbooks-3
in the solo.rb
.
Yes, I do have Berksfile. And it works normally with --no-berkshelf option. Is it normal behaviour?
So you also have a Cheffile? If so, yes. But use of both files is (I believe) quite uncommon.
On Wednesday, August 20, 2014, Mind notifications@github.com wrote:
Yes, I do have Berksfile. And it works normally with --no-berkshelf option. Is it normal behaviour?
— Reply to this email directly or view it on GitHub https://github.com/matschaffer/knife-solo/issues/397#issuecomment-52759645 .
-Mat
about.me/matschaffer
Gonna close this out since I suspect the interplay is between librarian-chef & berkshelf rather than knife-solo. Feel free to re-open if you find something to the contrary. Thanks!
Sorry for delay, but I do not have Cheffile. Only Berksfile. It's quite strange.
I'm unclear on what that extra cookbook dir is then. Do you have a local cookbooks folder referenced from knife.rb?
I am encountering the same error.
================================================================================
Recipe Compile Error in /tmp/vagrant-chef/147dc1df76820b45ed8922af85ceb3f9/cookbooks/mysql/libraries/provider_mysql_service_freebsd.rb
================================================================================
NameError
---------
uninitialized constant Opscode::Mysql
Cookbook Trace:
---------------
/tmp/vagrant-chef/147dc1df76820b45ed8922af85ceb3f9/cookbooks/mysql/libraries/provider_mysql_service_freebsd.rb:4:in `<top (required)>'
Relevant File Content:
----------------------
/tmp/vagrant-chef/147dc1df76820b45ed8922af85ceb3f9/cookbooks/mysql/libraries/provider_mysql_service_freebsd.rb:
1: require 'chef/provider/lwrp_base'
2: require 'shellwords'
3:
4>> include Opscode::Mysql::Helpers
5:
6: class Chef
7: class Provider
8: class MysqlService
9: class FreeBSD < Chef::Provider::MysqlService
10: use_inline_resources if defined?(use_inline_resources)
11:
12: def whyrun_supported?
13: true
Though I am rather novice to chef. What I find curious is why it tries to run (and fail) with the free bsd service where your variables suggest you are running Debian. I am running this on a cloudstack VM with CentOS and I get the same error (when compiling provider_mysql_service_freebsd.rb).
Can you post your kitchen somewhere so I can give it a try? This sorta feels like a bug in the mysql cookbook but I can poke at it a bit and see what I can find. You might also want to show your error to the maintainers of that project.
Hi,
I have faced some issues during patching my cookbook-set by knife-solo. It prevents to very strange errors with community cookbooks. But the same set of cookbooks is working if we will use it separate from knife solo.
Some examples can be found below:
Below configuration works find on vagrant+berkshelf+chef-solo
Berksfile:
But with knife solo node configuration and same berksfile it throw different errors: _Node.json_
_chef-solo output while bootstrapping with knife solo_
This can be fixed with previous version of MySQL cookbook in Berksfile(magic bug...), but then it will exit with another error: