Bug 2053476 - Vagrant 2.2.19 fails on dependency loading
Summary: Vagrant 2.2.19 fails on dependency loading
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: vagrant
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Vít Ondruch
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-11 12:01 UTC by Jarek Prokop
Modified: 2022-03-03 15:36 UTC (History)
6 users (show)

Fixed In Version: vagrant-2.2.19-3.fc37
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-03-03 15:36:59 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jarek Prokop 2022-02-11 12:01:35 UTC
Description of problem:
Running `vagrant` on rawhide results in a traceback with "undefined method `request' for nil:NilClass" and "Unable to satisfy the following requirements"

Version-Release number of selected component (if applicable):
vagrant-2.2.19-2.fc36

How reproducible:
Always

Steps to Reproduce:
1. `$ sudo dnf install -y @vagrant`
2. `$ vagrant`

Actual results:
~~~
$ vagrant
/usr/share/rubygems/rubygems/resolver/conflict.rb:47:in `conflicting_dependencies': undefined method `request' for nil:NilClass (NoMethodError)

    [@failed_dep.dependency, @activated.request.dependency]
                                       ^^^^^^^^
	from /usr/share/rubygems/rubygems/exceptions.rb:61:in `conflicting_dependencies'
	from /usr/share/rubygems/rubygems/exceptions.rb:55:in `initialize'
	from /usr/share/rubygems/rubygems/resolver.rb:193:in `exception'
	from /usr/share/rubygems/rubygems/resolver.rb:193:in `raise'
	from /usr/share/rubygems/rubygems/resolver.rb:193:in `rescue in resolve'
	from /usr/share/rubygems/rubygems/resolver.rb:191:in `resolve'
	from /usr/share/rubygems/rubygems/request_set.rb:411:in `resolve'
	from /usr/share/rubygems/rubygems/request_set.rb:423:in `resolve_current'
	from /usr/share/rubygems/rubygems.rb:230:in `finish_resolve'
	from /usr/share/rubygems/rubygems.rb:287:in `block in activate_bin_path'
	from /usr/share/rubygems/rubygems.rb:285:in `synchronize'
	from /usr/share/rubygems/rubygems.rb:285:in `activate_bin_path'
	from /usr/share/vagrant/gems/bin/vagrant:25:in `<main>'
/usr/share/rubygems/rubygems/resolver/molinillo/lib/molinillo/resolution.rb:317:in `raise_error_unless_state': Unable to satisfy the following requirements: (Gem::Resolver::Molinillo::VersionConflict)

- `vagrant (= 2.2.19)` required by `user-specified dependency`
	from /usr/share/rubygems/rubygems/resolver/molinillo/lib/molinillo/resolution.rb:299:in `block in unwind_for_conflict'
	from <internal:kernel>:90:in `tap'
	from /usr/share/rubygems/rubygems/resolver/molinillo/lib/molinillo/resolution.rb:297:in `unwind_for_conflict'
	from /usr/share/rubygems/rubygems/resolver/molinillo/lib/molinillo/resolution.rb:682:in `attempt_to_activate'
	from /usr/share/rubygems/rubygems/resolver/molinillo/lib/molinillo/resolution.rb:254:in `process_topmost_state'
	from /usr/share/rubygems/rubygems/resolver/molinillo/lib/molinillo/resolution.rb:182:in `resolve'
	from /usr/share/rubygems/rubygems/resolver/molinillo/lib/molinillo/resolver.rb:43:in `resolve'
	from /usr/share/rubygems/rubygems/resolver.rb:190:in `resolve'
	from /usr/share/rubygems/rubygems/request_set.rb:411:in `resolve'
	from /usr/share/rubygems/rubygems/request_set.rb:423:in `resolve_current'
	from /usr/share/rubygems/rubygems.rb:230:in `finish_resolve'
	from /usr/share/rubygems/rubygems.rb:287:in `block in activate_bin_path'
	from /usr/share/rubygems/rubygems.rb:285:in `synchronize'
	from /usr/share/rubygems/rubygems.rb:285:in `activate_bin_path'
	from /usr/share/vagrant/gems/bin/vagrant:25:in `<main>'
~~~

Expected results:
Vagrant runs correctly

Additional info:
Ruby NVR: ruby-3.1.0-160.fc36.x86_64

Comment 2 Jarek Prokop 2022-02-23 15:16:17 UTC
I investigated and found that it seems to be more a fault of RubyGems. The failure when trying to run `vagrant` command is caused by a Ruby runtime version restriction in gemspec being "< 3.1"[0]. Relaxing that seems fine. However, RubyGems does not seem to be prepared for reporting nicely this kind of incompatibility.

I had 1 successful `vagrant up` (among a bunch of unsuccessful ones) and I was able to connect after that,
not sure how though since it fails on SSH connect in Net::SSH during VM setup,
at that time I was playing around the Net::SSH method which is reported as the failing one `net-ssh-6.2.0.rc2/lib/net/ssh/transport/kex/ecdh_sha2_nistp256.rb:21:in `generate_key!'`
with IRB and after exiting the machine started.

So vagrant currently seems blocked on OpenSSL 3.0 compatibility.

[0] https://github.com/hashicorp/vagrant/blob/main/vagrant.gemspec#L15

Ruby traceback:
~~~
/usr/share/gems/gems/net-ssh-6.2.0.rc2/lib/net/ssh/transport/kex/ecdh_sha2_nistp256.rb:21:in `generate_key!': pkeys are immutable on OpenSSL 3.0 (OpenSSL::PKey::PKeyError)
	from /usr/share/gems/gems/net-ssh-6.2.0.rc2/lib/net/ssh/transport/kex/ecdh_sha2_nistp256.rb:21:in `generate_key'
	from /usr/share/gems/gems/net-ssh-6.2.0.rc2/lib/net/ssh/transport/kex/abstract.rb:32:in `initialize'
	from /usr/share/gems/gems/net-ssh-6.2.0.rc2/lib/net/ssh/transport/algorithms.rb:439:in `new'
	from /usr/share/gems/gems/net-ssh-6.2.0.rc2/lib/net/ssh/transport/algorithms.rb:439:in `exchange_keys'
	from /usr/share/gems/gems/net-ssh-6.2.0.rc2/lib/net/ssh/transport/algorithms.rb:247:in `proceed!'
	from /usr/share/gems/gems/net-ssh-6.2.0.rc2/lib/net/ssh/transport/algorithms.rb:186:in `accept_kexinit'
	from /usr/share/gems/gems/net-ssh-6.2.0.rc2/lib/net/ssh/transport/session.rb:210:in `block in poll_message'
	from /usr/share/gems/gems/net-ssh-6.2.0.rc2/lib/net/ssh/transport/session.rb:190:in `loop'
	from /usr/share/gems/gems/net-ssh-6.2.0.rc2/lib/net/ssh/transport/session.rb:190:in `poll_message'
	from /usr/share/gems/gems/net-ssh-6.2.0.rc2/lib/net/ssh/transport/session.rb:225:in `block in wait'
	from /usr/share/gems/gems/net-ssh-6.2.0.rc2/lib/net/ssh/transport/session.rb:223:in `loop'
	from /usr/share/gems/gems/net-ssh-6.2.0.rc2/lib/net/ssh/transport/session.rb:223:in `wait'
	from /usr/share/gems/gems/net-ssh-6.2.0.rc2/lib/net/ssh/transport/session.rb:90:in `initialize'
	from /usr/share/gems/gems/net-ssh-6.2.0.rc2/lib/net/ssh.rb:251:in `new'
	from /usr/share/gems/gems/net-ssh-6.2.0.rc2/lib/net/ssh.rb:251:in `start'
	from /usr/share/vagrant/gems/gems/vagrant-2.2.19/plugins/communicators/ssh/communicator.rb:467:in `block (2 levels) in connect'
	from /usr/share/ruby/timeout.rb:107:in `block in timeout'
	from /usr/share/ruby/timeout.rb:36:in `block in catch'
	from /usr/share/ruby/timeout.rb:36:in `catch'
	from /usr/share/ruby/timeout.rb:36:in `catch'
	from /usr/share/ruby/timeout.rb:123:in `timeout'
	from /usr/share/vagrant/gems/gems/vagrant-2.2.19/plugins/communicators/ssh/communicator.rb:433:in `block in connect'
	from /usr/share/vagrant/gems/gems/vagrant-2.2.19/lib/vagrant/util/retryable.rb:17:in `retryable'
	from /usr/share/vagrant/gems/gems/vagrant-2.2.19/plugins/communicators/ssh/communicator.rb:432:in `connect'
	from /usr/share/vagrant/gems/gems/vagrant-2.2.19/plugins/communicators/ssh/communicator.rb:87:in `block in wait_for_ready'
	from /usr/share/ruby/timeout.rb:107:in `block in timeout'
	from /usr/share/ruby/timeout.rb:36:in `block in catch'
	from /usr/share/ruby/timeout.rb:36:in `catch'
	from /usr/share/ruby/timeout.rb:36:in `catch'
	from /usr/share/ruby/timeout.rb:123:in `timeout'
	from /usr/share/vagrant/gems/gems/vagrant-2.2.19/plugins/communicators/ssh/communicator.rb:63:in `wait_for_ready'
	from /usr/share/vagrant/gems/gems/vagrant-2.2.19/lib/vagrant/action/builtin/wait_for_communicator.rb:16:in `block in call'
~~~

Comment 3 Pavel Valena 2022-02-24 14:05:36 UTC
Please note there's upstream PR for Ruby 3.1 compatibility. They report Vagrant runs smoothly for them.

https://github.com/hashicorp/vagrant/pull/12638

Comment 4 Jarek Prokop 2022-02-24 15:07:07 UTC
> Please note there's upstream PR for Ruby 3.1 compatibility. They report Vagrant runs smoothly for them.

Hmm, yeah, they bump the max required_ruby_version which fixes the issue described in Comment#0.

However, there is still the question of OpenSSL 3.0 and Net::SSH vs Vagrant functionality.

Comment 5 Vít Ondruch 2022-02-25 11:37:55 UTC
https://github.com/net-ssh/net-ssh/issues/843

There is confusion between ruby/openssl binding and OpenSSL, the actual library. Both are of version 3.0 now.

Comment 6 Vít Ondruch 2022-02-25 11:43:50 UTC
BTW it would be nice to first fix the FTBFS (probably due to rubygem-rspec dropping dependency on rubygem-rake, but that might be the first issue), then followed with this one. Step by step. Better something than have everything in place at once later.

Comment 7 Vít Ondruch 2022-02-25 11:46:04 UTC
(In reply to Vít Ondruch from comment #6)
> BTW it would be nice to first fix the FTBFS (probably due to rubygem-rspec
> dropping dependency on rubygem-rake, but that might be the first issue),
> then followed with this one. Step by step. Better something than have
> everything in place at once later.

Ah, I see the PR [1] fixes this, right.


[1] https://src.fedoraproject.org/rpms/vagrant/pull-request/28

Comment 8 Fedora Update System 2022-03-03 15:35:40 UTC
FEDORA-2022-1420f0bb0e has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-1420f0bb0e

Comment 9 Fedora Update System 2022-03-03 15:36:59 UTC
FEDORA-2022-1420f0bb0e has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.