net-ssh version mismatch #1355

Closed
benlangfeld opened this Issue Feb 6, 2013 · 20 comments

Projects

None yet

10 participants

@benlangfeld
ERROR:  While executing gem ... (Gem::DependencyError)
    Unable to resolve dependencies: vagrant requires net-ssh (~> 2.2.2); net-scp requires net-ssh (>= 2.6.4)
ERROR:  While executing gem ... (Gem::DependencyError)
    Unable to resolve dependencies: vagrant requires net-ssh (~> 2.2.2); net-scp requires net-ssh (>= 2.6.4); ridley requires net-ssh (>= 0); chef requires net-ssh (~> 2.2.2); net-ssh-multi requires net-ssh (>= 2.6.4); net-ssh-gateway requires net-ssh (>= 2.6.4)
@benlangfeld

Why is vagrant locked to minor versions (~> 2.2.2 rather than ~> 2.2)?

@mitchellh
Owner

Oh wow. In a minor release of net-scp, they updated the requirement of net-ssh to >= 2.6.5. That is special.

And to answer your second question: locking to minor versions is Vagrant being extra careful with dependencies. Historically, minor changes have broken Vagrant, and I want to avoid this with just patch versions. This allows Vagrant to use net-ssh >= 2.2.2, < 2.3.0, which is what I want.

Anyways, net-scp did a bad thing here with their dependencies.

In the mean time, use the installer to avoid this issue.

@calavera
Contributor
calavera commented Feb 6, 2013

actually it's net-ssh-multi that was updated to net-ssh => 2.6.4 in a patch version.

I'm suffering the same problem with chef right now, it's a total shit show.

@jashmenn
jashmenn commented Feb 6, 2013

I'm having the same issue here with chef ~10.16.4 without vagrant. It's really terrible, but I don't think its a vagrant issue necessarily.

@calavera
Contributor
calavera commented Feb 6, 2013

not at all

@mitchellh
Owner

I'm not closing this issue because it is an issue whether I like it or not if Vagrant cannot be properly installed. I'm doing what I can to fix this by first reporting the issue upstream in net-ssh. If no fix comes forward, I'll have to do something else.

@mitchellh
Owner
@mitchellh mitchellh closed this Feb 6, 2013
@VasylMarchuk

Another problem is that Chef now requires net-ssh ~> 2.6 :(

$ vagrant gem dependency chef
Gem chef-11.4.0
  erubis (>= 0)
  highline (>= 1.6.9)
  json (<= 1.7.7, >= 1.4.4)
  mixlib-authentication (>= 1.3.0)
  mixlib-cli (~> 1.3.0)
  mixlib-config (>= 1.1.2)
  mixlib-log (>= 1.3.0)
  mixlib-shellout (>= 0)
  net-ssh (~> 2.6)
  net-ssh-multi (~> 1.1.0)
  ohai (>= 0.6.0)
  rack (>= 0, development)
  rake (>= 0, development)
  rdoc (>= 0, development)
  rest-client (< 1.7.0, >= 1.0.4)
  rspec-core (~> 2.12.0, development)
  rspec-expectations (~> 2.12.0, development)
  rspec-mocks (~> 2.12.0, development)
  rspec_junit_formatter (>= 0, development)
  sdoc (>= 0, development)
  yajl-ruby (~> 1.1)

We use librarian to auto-install cookbooks, and we have a plugin for Vagrant that runs librarian automatically. But now, we can't run librarian from within Vagrantfile because Librarian installs latest chef-11.4.0, and chef requires net-ssh-2.6

@trobrock

Is there any update to this net-ssh dep issue? This is killing most of the chef related tools I use.

@ccollicutt

yeah I don't understand how this is fixed...?

@mitchellh
Owner

The original issue is fixed. The issue mismatching Chef is a different thing, unfortunately.

I can't confidently up the net-ssh version on Vagrant with 1.0.x because I don't want to risk stability. The answer gets more complicated because the next version and all future versions of Vagrant (1.1+) aren't even distributed as gems so this issue completely goes away. So the question is how to handle this for the stable 1.0.x series. And I'm not sure.

@cassianoleal

The issue does not completely go away with 1.1. If I try to load a plugin that requires Chef, then the dependencies are all broken again.

@mitchellh
Owner

What plugin requires Chef?

@cassianoleal

https://rubygems.org/gems/vagrant-butcher
It's my own and I will probably update it so that it doesn't depend on Chef, but that's hardly a solution to the compatibility issue.
Other plugins might exist that require it, and others might be written. By keeping the version constraint on net-ssh, you're effectively prohibiting any plugins to require Chef.

@mitchellh
Owner

I am effectively prohibiting plugins that require Chef in the name of overall stability for the Vagrant project itself. It is a very hard argument to change dependency constraints because they require a LOT of testing. I upped the versin of net-scp/net-ssh in 1.1.1 and have received numerous bugs because of it. It is experiences like this that make it so that I don't want to change things if they ain't broke.

At the same time, I want to be as supportive as I can to other libraries for plugins.

It is a difficult balance. In the case of Chef, however, a project that has historically constantly broken dependencies with me (because they too, consider themselves #1, as they should), I recommend not depending on it.

@cassianoleal

I totally see your point, and I appreciate your trying to keep stuff as stable as possible. That should always be a priority when releasing software.
I'd like to see more compatibility with chef, though. If Chef has been breaking dependencies, it means that their users are depending heavily upon vagrant, a situation that begs for more collaboration between the projects, I think.

Anyway, thanks for taking the time to clarify.

@mitchellh
Owner

I think we (Chef and I) may have differing viewpoints. I'd like to see Chef distributed less as Ruby project (no more gem install!) and interaction to occur more based on "plumbing vs. porcelain" like git. That way, your plugin could just shell out to Chef/Knife, and let that use its own sandbox. This is the direction that Vagrant is heading.

Either way, I think this issue needs more time. Sad.

@ibawolf
ibawolf commented Apr 15, 2013

Is there any known fix to the root issue of this thread? I'm getting a similar error trying to install vagrant with veewee under Ubuntu 12.04 LTS (under rvm, under ruby 1.9.3-p392).

"Unable to resolve dependencies: fog requires net-scp (> 1.1); vagrant requires net-scp (> 1.0.4)"

@norru
norru commented Feb 2, 2017

Did they do it again?

chef requires net-ssh (~&gt; 2.6); net-ssh-multi requires net-ssh (&gt;= 2.6.5); net-ssh-gateway requires net-ssh (&gt;= 4.0.0)
~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment