Skip to content
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

net-ssh version mismatch #1355

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

net-ssh version mismatch #1355

benlangfeld opened this issue Feb 6, 2013 · 20 comments

Comments

@benlangfeld
Copy link

@benlangfeld benlangfeld commented Feb 6, 2013

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
Copy link
Author

@benlangfeld benlangfeld commented Feb 6, 2013

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

@mitchellh
Copy link
Member

@mitchellh mitchellh commented Feb 6, 2013

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
Copy link
Contributor

@calavera 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
Copy link

@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
Copy link
Contributor

@calavera calavera commented Feb 6, 2013

not at all

@mitchellh
Copy link
Member

@mitchellh mitchellh commented Feb 6, 2013

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
Copy link
Member

@mitchellh mitchellh commented Feb 6, 2013

@mitchellh mitchellh closed this Feb 6, 2013
@VasylMarchuk
Copy link

@VasylMarchuk VasylMarchuk commented Feb 13, 2013

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
Copy link

@trobrock trobrock commented Feb 26, 2013

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

@ccollicutt
Copy link

@ccollicutt ccollicutt commented Mar 5, 2013

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

@mitchellh
Copy link
Member

@mitchellh mitchellh commented Mar 5, 2013

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.

@c10l
Copy link

@c10l c10l commented Mar 21, 2013

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
Copy link
Member

@mitchellh mitchellh commented Mar 21, 2013

What plugin requires Chef?

@c10l
Copy link

@c10l c10l commented Mar 21, 2013

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
Copy link
Member

@mitchellh mitchellh commented Mar 21, 2013

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.

@c10l
Copy link

@c10l c10l commented Mar 21, 2013

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
Copy link
Member

@mitchellh mitchellh commented Mar 21, 2013

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
Copy link

@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
Copy link

@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)
~
@hashibot hashibot bot locked and limited conversation to collaborators Apr 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
10 participants