matschaffer / knife-solo

DEPRECATED: Please consider using https://knife-zero.github.io/, ansible, or visit https://www.chef.io/ for other ideas
MIT License
786 stars 213 forks source link

net-ssh gem version conflict when running knife solo prepare using chefdk 2.5.3-1 #531

Closed janskarvall closed 6 years ago

janskarvall commented 6 years ago

I have Ubuntu 16.04 LTS desktop (64 bit) running in VirtualBox. I just installed the chefdk 2.5.3-1 debian package in that machine.

I have run eval "$(chef shell-init bash)", as I entered this in /etc/profile.d/chefdk.sh, and everything looks fine.

I then installed knife solo using chef gem install knife-solo -v 0.6.0.

But when I try to prepare my node, the one that runs in the VirtualBox, I get the following output:

janne@janne-VirtualBox:~$ knife solo prepare 127.0.0.1
/opt/chefdk/embedded/lib/ruby/site_ruby/2.4.0/rubygems/specification.rb:2325:in `raise_if_conflicts': Unable to activate knife-solo-0.6.0, because net-ssh-4.1.0 conflicts with net-ssh (< 4.0, >= 2.7) (Gem::ConflictError)
    from /opt/chefdk/embedded/lib/ruby/site_ruby/2.4.0/rubygems/specification.rb:1438:in `activate'
    from /opt/chefdk/embedded/lib/ruby/site_ruby/2.4.0/rubygems.rb:224:in `rescue in try_activate'
    from /opt/chefdk/embedded/lib/ruby/site_ruby/2.4.0/rubygems.rb:217:in `try_activate'
    from /opt/chefdk/embedded/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:128:in `rescue in require'
    from /opt/chefdk/embedded/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:39:in `require'
    from /home/janne/.chefdk/gem/ruby/2.4.0/gems/knife-solo-0.6.0/lib/chef/knife/kitchen.rb:1:in `<top (required)>'
    from /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.8.5/lib/chef/knife/core/subcommand_loader.rb:85:in `load'
    from /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.8.5/lib/chef/knife/core/subcommand_loader.rb:85:in `block in load_commands'
    from /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.8.5/lib/chef/knife/core/subcommand_loader.rb:85:in `each'
    from /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.8.5/lib/chef/knife/core/subcommand_loader.rb:85:in `load_commands'
    from /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.8.5/lib/chef/knife/core/subcommand_loader.rb:95:in `load_command'
    from /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.8.5/lib/chef/knife/core/subcommand_loader.rb:109:in `command_class_from'
    from /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.8.5/lib/chef/knife.rb:152:in `subcommand_class_from'
    from /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.8.5/lib/chef/knife.rb:215:in `run'
    from /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.8.5/lib/chef/application/knife.rb:160:in `run'
    from /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.8.5/bin/knife:25:in `<top (required)>'
    from /opt/chefdk/bin/knife:250:in `load'
    from /opt/chefdk/bin/knife:250:in `<main>'
janne@janne-VirtualBox:~$
janne@janne-VirtualBox:~$ chef gem list | grep net-ssh
net-ssh (4.1.0, 3.2.0)
net-ssh-gateway (1.3.0)
net-ssh-multi (1.2.1)
janne@janne-VirtualBox:~$

I'm sorry that such an issue goes beyond my ability to interpret.

I have been using chefdk 1.1.16-1 without problems.

matschaffer commented 6 years ago

Yes, 0.6.0 is known to be incompatible with the latest chefdk. If you do chef gem install knife-solo --pre you should get the pre-release.

Maybe it's time to call it a "release" but I haven't had time to check integration tests for it, and I don't suspect anyone else has.