plugin install fails in ubuntu/debian packaged version of vagrant (xenial)

Bug #1559420 reported by Benjamin Geese
180
This bug affects 42 people
Affects Status Importance Assigned to Milestone
vagrant (Debian)
Fix Released
Unknown
vagrant (Ubuntu)
Fix Released
Undecided
Unassigned
Xenial
Confirmed
Undecided
Unassigned

Bug Description

The plugin installation via vagrant plugin install fails on the debian/ubuntu packages version of vagrant on xenial.
Using the upstream package for debian (same software version) works as expected.

Ubuntu version: Xenial
Package version: 1.8.1+dfsg-1

This is the error message:
/usr/lib/ruby/2.3.0/rubygems/specification.rb:946:in `all=': undefined method `group_by' for nil:NilClass (NoMethodError)
 from /usr/lib/ruby/vendor_ruby/vagrant/bundler.rb:275:in `with_isolated_gem'
 from /usr/lib/ruby/vendor_ruby/vagrant/bundler.rb:231:in `internal_install'
 from /usr/lib/ruby/vendor_ruby/vagrant/bundler.rb:102:in `install'
 from /usr/lib/ruby/vendor_ruby/vagrant/plugin/manager.rb:62:in `block in install_plugin'
 from /usr/lib/ruby/vendor_ruby/vagrant/plugin/manager.rb:72:in `install_plugin'
 from /usr/share/vagrant/plugins/commands/plugin/action/install_gem.rb:37:in `call'
 from /usr/lib/ruby/vendor_ruby/vagrant/action/warden.rb:34:in `call'
 from /usr/lib/ruby/vendor_ruby/vagrant/action/builder.rb:116:in `call'
 from /usr/lib/ruby/vendor_ruby/vagrant/action/runner.rb:66:in `block in run'
 from /usr/lib/ruby/vendor_ruby/vagrant/util/busy.rb:19:in `busy'
 from /usr/lib/ruby/vendor_ruby/vagrant/action/runner.rb:66:in `run'
 from /usr/share/vagrant/plugins/commands/plugin/command/base.rb:14:in `action'
 from /usr/share/vagrant/plugins/commands/plugin/command/install.rb:32:in `block in execute'
 from /usr/share/vagrant/plugins/commands/plugin/command/install.rb:31:in `each'
 from /usr/share/vagrant/plugins/commands/plugin/command/install.rb:31:in `execute'
 from /usr/share/vagrant/plugins/commands/plugin/command/root.rb:56:in `execute'
 from /usr/lib/ruby/vendor_ruby/vagrant/cli.rb:42:in `execute'
 from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:268:in `cli'
 from /usr/bin/vagrant:173:in `<main>'

I suspect this is caused by one of the Ubuntu/Debian patches to the package.

Tags: xenial
Changed in vagrant (Debian):
status: Unknown → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in vagrant (Ubuntu):
status: New → Confirmed
Revision history for this message
Thiago Martins (martinx) wrote :

Can someone fix this before Xenial release?
Cheers!

Changed in vagrant (Debian):
status: New → Fix Committed
Changed in vagrant (Debian):
status: Fix Committed → Fix Released
Revision history for this message
Thiago Martins (martinx) wrote :

Any plans to upload this fix for Xenial?

Revision history for this message
Thiago Martins (martinx) wrote :

Guys?!

Revision history for this message
Brooks B (bmbeverst) wrote :

Downloading from the Vagrant fixes it.

This diff is rumored to fix it. From: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=818237#28

---
 lib/vagrant/bundler.rb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/vagrant/bundler.rb b/lib/vagrant/bundler.rb
index 5a5c185..c4a3837 100644
--- a/lib/vagrant/bundler.rb
+++ b/lib/vagrant/bundler.rb
@@ -272,7 +272,6 @@ module Vagrant

       # Reset the all specs override that Bundler does
       old_all = Gem::Specification._all
- Gem::Specification.all = nil

       # /etc/gemrc and so on.
       old_config = nil
@@ -286,6 +285,8 @@ module Vagrant
       end
       Gem.configuration = NilGemConfig.new

+ Gem::Specification.reset
+
       # Use a silent UI so that we have no output
       Gem::DefaultUserInteraction.use_ui(Gem::SilentUI.new) do
         return yield

--
2.7.0

Revision history for this message
Thiago Martins (martinx) wrote :

Please, sync with Debian!

vagrant 1.8.1+dfsg-2

https://tracker.debian.org/pkg/vagrant

Fix is already there, no need to way more... :-P

Revision history for this message
Quanah (quanah-zimbra) wrote :

Just get vagrant from upstream, they have an ubuntu16 build and it actually works.

Revision history for this message
anatoly techtonik (techtonik) wrote :

Dammit, who is able to raise priority of the bug to critical? So many hours wasted.

Revision history for this message
Thiago Martins (martinx) wrote :

Come on guys, close this bug!

Revision history for this message
Nish Aravamudan (nacc) wrote :

It would appear this has already been fixed in Yakkety. To request an -update for Xenial, someone will need to take the time to backport (presumably) and provide a debdiff in this bug, following https://wiki.ubuntu.com/StableReleaseUpdates.

Timo Aaltonen (tjaalton)
Changed in vagrant (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in vagrant (Ubuntu Xenial):
status: New → Confirmed
Revision history for this message
Thiago Martins (martinx) wrote :

Any ETA to make this to appear on Xenial?

tags: added: xenial
Revision history for this message
Jean-Pierre van Riel (jpvr) wrote :

Still impacting me, and xenial is meant to be LTS, so leaving vagrant broken is a bit rough?

Also, while upstream provides an alternative, it's quite nasty as it ends up bundling all it's own lib dependencies and, in my case, replaced/force upgraded libarchive13 causing some package dependency issues.

Options:
- backport patch
- update to newer upstream vagrant version

Assuming vagrant 1.8.x series, 1.8.5 includes a huge set of bug fixes and should be mostly backward compatible with 1.8.1, given it's not a major version change. There was only 3 points noted under "BREAKING CHANGES" for 1.8.3. They didn't seem to be major concerns.

Revision history for this message
Bruno Girin (brunogirin) wrote :

This is still affecting me too. What is the process to get this backported to xenial? Having vagrant broken in an LTS is not ideal.

Revision history for this message
Stanislas LEDUC (stanislas-leduc) wrote :

Still impacting user use xenial. I think is not really good to have broken package in LTS.
Another report bug (1603935).
Also that fixed in upstream.

I rebuild with success vagrant 1.8.1+dsfg-2.

Also i try to rebuilt 1.8.4 from Yakkety for backport to Xenial, but depend to ruby-bundler >= 1.12, i need to backport them also available and check that not broken others packages.

I push them into ppa:stanislas.leduc/vagrant-fix-xenial, waiting for ppa queue.

Best regards

Revision history for this message
Stanislas LEDUC (stanislas-leduc) wrote :

Sorry i'm wrong naming ppa, it's ppa:stanislas.leduc/vagrant-xenial.

Revision history for this message
Cas (calumlind) wrote :

The one-line quick fix for vagrant bundler.rb is as follows:

    sudo sed -i'' "s/Specification.all = nil/Specification.reset/" /usr/lib/ruby/vendor_ruby/vagrant/bundler.rb

Source: https://github.com/vagrant-libvirt/vagrant-libvirt/issues/575#issuecomment-231612940

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.