FS#75660 - [vagrant] Missing Dependency 'delegate'
Attached to Project:
Community Packages
Opened by Jared Baldridge (jrb) - Sunday, 21 August 2022, 18:25 GMT
Last edited by Jonathan Steel (jsteel) - Saturday, 24 September 2022, 07:27 GMT
Opened by Jared Baldridge (jrb) - Sunday, 21 August 2022, 18:25 GMT
Last edited by Jonathan Steel (jsteel) - Saturday, 24 September 2022, 07:27 GMT
|
Details
Description:
After upgrading from vagrant 2.2.19-2 to vagrant 2.3.0-2, vagrant is unable to find the 'delegate' gem and immediately exits. Additional info: * vagrant 2.3.0-2 Steps to reproduce: 1) Install vagrant 2.3.0-2 2) Attempt to run any vagrant command 3) Watch ruby exit with: $ vagrant /usr/lib/ruby/3.0.0/rubygems/specification.rb:1453:in `rescue in block in activate_dependencies': Could not find 'delegate' (>= 0) among 99 total gem(s) (Gem::MissingSpecError) Checked in 'GEM_PATH=/opt/vagrant/embedded/gems/2.3.0' at: /usr/lib/ruby/gems/3.0.0/specifications/weakref-0.1.1.gemspec, execute `gem env` for more information from /usr/lib/ruby/3.0.0/rubygems/specification.rb:1450:in `block in activate_dependencies' from /usr/lib/ruby/3.0.0/rubygems/specification.rb:1439:in `each' from /usr/lib/ruby/3.0.0/rubygems/specification.rb:1439:in `activate_dependencies' from /usr/lib/ruby/3.0.0/rubygems/specification.rb:1421:in `activate' from /usr/lib/ruby/3.0.0/rubygems/core_ext/kernel_gem.rb:68:in `block in gem' from /usr/lib/ruby/3.0.0/rubygems/core_ext/kernel_gem.rb:68:in `synchronize' from /usr/lib/ruby/3.0.0/rubygems/core_ext/kernel_gem.rb:68:in `gem' from <internal:/usr/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:73:in `require' from /opt/vagrant/embedded/gems/2.3.0/gems/grpc-1.48.0-x86_64-linux/src/ruby/lib/grpc/generic/active_call.rb:16:in `<top (required)>' from /opt/vagrant/embedded/gems/2.3.0/gems/grpc-1.48.0-x86_64-linux/src/ruby/lib/grpc.rb:25:in `require_relative' from /opt/vagrant/embedded/gems/2.3.0/gems/grpc-1.48.0-x86_64-linux/src/ruby/lib/grpc.rb:25:in `<top (required)>' from <internal:/usr/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require' from <internal:/usr/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require' from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/protobufs/proto/vagrant_plugin_sdk/plugin_services_pb.rb:4:in `<top (required)>' from <internal:/usr/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require' from <internal:/usr/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require' from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/kernel_v2/config/vm.rb:17:in `<top (required)>' from <internal:/usr/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require' from <internal:/usr/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require' from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/kernel_v2/plugin.rb:39:in `block in <class:Plugin>' from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/registry.rb:27:in `get' from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/registry.rb:49:in `block in each' from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/registry.rb:48:in `each' from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/registry.rb:48:in `each' from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/config/v2/root.rb:46:in `finalize!' from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/config/v2/loader.rb:21:in `finalize' from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/config/loader.rb:200:in `load' from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/vagrantfile.rb:31:in `initialize' from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/environment.rb:817:in `new' from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/environment.rb:817:in `vagrantfile' from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/environment.rb:998:in `process_configured_plugins' from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/environment.rb:189:in `initialize' from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/bin/vagrant:211:in `new' from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/bin/vagrant:211:in `<main>' |
This task depends upon
Also, ruby-3.0.4-6 broke the vagrant-libvirt plugin:
```
❯ vagrant up
[fog][DEPRECATION] Unable to require fog/libvirt/compute
[fog][DEPRECATION] Falling back to deprecated path fog/compute/libvirt. The preferred file path format has changed from service/provider to provider/service. Please update this service provider to use the preferred format.
[fog][WARNING] Error while loading provider libvirt: cannot load such file -- fog/compute/libvirt
Error while connecting to Libvirt: libvirt has no compute service
```
Downgrading to ruby-3.0.4-5 works fine. Not sure if there is something to fix in the vagrant package due to the de-vendoring of multiple libraries in ruby or if this is purely a ruby issue.
[edit] Sorry just noticed my ruby is a little behind, I'm updating now and will re-test this [/edit]
[edit] Yes I can replicate this with the latest ruby [/edit]
To reproduce the error you just need to `vagrant plugin install vagrant-libvirt` and try starting a libvirt box. E.g.:
vagrant init almalinux/8
vagrant up --provider libvirt
It will fail right after fetching the box image.
This matches with what was de-vendored in ruby-3.0.4-6.
These issues are very weird though since both ruby-delegate and ruby-cgi are installed on the system and I would think they should be found by vagrant...
The broken `cgi` dependency in `vagrant-libvirt` probably needs to be mitigated by `fog` adding it as a dependency, instead of directly adding it to the `vagrant` package.
A workaround I found is to use `vagrant plugin install cgi` to manually install the gem along side the `vagrant-libvirt` gem that depends on it.
> The broken `cgi` dependency in `vagrant-libvirt` probably needs to be mitigated by `fog` adding it as a dependency
I am no ruby expert but isn't stdlib, and consequently cgi, just expected to be present?