Last modified: 2014-10-19 00:46:57 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T73878, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 71878 - MediaWiki-Vagrant plugin not compatible with Vagrant 1.4.3
MediaWiki-Vagrant plugin not compatible with Vagrant 1.4.3
Status: RESOLVED FIXED
Product: MediaWiki-Vagrant
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Normal major
: ---
Assigned To: Dan Duvall
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-10-09 12:27 UTC by Gilles Dubuc
Modified: 2014-10-19 00:46 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Gilles Dubuc 2014-10-09 12:27:02 UTC
Using an up-to-date vagrant checkout:

Gilles-Dubucs-MacBook-Air:vagrant gdubuc$ ./setup.sh 
Plugin vagrant-vbguest is already installed
Installing plugin mediawiki-vagrant-0.2.0.gem
- Installing the 'mediawiki-vagrant-0.2.0.gem --version '0.2.0'' plugin. This can take a few minutes...
- Installed the plugin 'mediawiki-vagrant (0.2.0)'!
Failed to load the "mediawiki-vagrant" plugin. View logs for more details.
Vagrant failed to initialize at a very early stage:

There was an error loading a Vagrantfile. The file being loaded
and the error message are shown below. This is usually caused by
a syntax error.

Path: /Users/gdubuc/Dropbox/Mediawiki/vagrant/Vagrantfile
Message: uninitialized constant MediaWikiVagrant::Environment
Failed to execute command `vagrant config --required` (pid 42568 exit 1)

I've tried rolling back a few commits in the past, seeing that you've been doing a lot of refactoring, and it didn't help.

Any quick workaround would be much appreciated.
Comment 1 Gilles Dubuc 2014-10-09 12:53:33 UTC
We've found a workaround, commenting out this block does the trick:

config.vm.provision :lsb_check do |lsb|
  lsb.version = '14.04'
end

In addition to adding:

require 'mediawiki-vagrant/environment'

Before MediaWikiVagrant::Environment.new
Comment 2 Bryan Davis 2014-10-09 15:14:00 UTC
Gilles reported on irc that he has Vagrant 1.4.3 installed. This may be part of the problem. I wonder if we should start checking for a minimum Vagrant version and/or testing plugin changes in a wider variety of Vagrant versions ourselves.
Comment 3 Gilles Dubuc 2014-10-09 15:19:39 UTC
Updating vagrant to the latest stable fixed it
Comment 4 Bryan Davis 2014-10-09 15:20:47 UTC
I would guess that the older Vagrant ships with a ruby version that doesn't like something our plugin is doing. Maybe use of require_relative?
Comment 5 Bryan Davis 2014-10-09 15:22:54 UTC
1.4.3 is the current version in Debian and Ubuntu apt repos. Our documentation says "Get the latest Vagrant (the version must be 1.2.6 or higher; For NFS, use 1.5.4 and up)". So we should either update the docs to say 1.6.0+ and check somehow in the Vagrantfile or fix things to work back to at least 1.4.3.
Comment 6 Dan Duvall 2014-10-15 21:34:58 UTC
Repro'd this on OS X by specifying "v1.4.3" in the Gemfile and running `bundle exec vagrant config --required`.

Gemfile:
    gem 'vagrant', git: 'https://github.com/mitchellh/vagrant.git', tag: 'v1.4.3'
Comment 7 Dan Duvall 2014-10-15 21:58:22 UTC
Looks like Vagrant 1.4 doesn't support options for commands—despite the fact the plugin API interface is supposed to be the same. :/

VAGRANT_LOG=debug vagrant config --required

ERROR root: Failed to load plugin: mediawiki-vagrant
ERROR root:  -- Error: #<ArgumentError: wrong number of arguments (2 for 1)>
ERROR root:  -- Backtrace:
ERROR root: /usr/lib/ruby/vendor_ruby/vagrant/plugin/v2/plugin.rb:84:in `command'
/home/vagrant/.vagrant.d/gems/gems/mediawiki-vagrant-0.2.0/lib/mediawiki-vagrant.rb:35:in `<class:Plugin>'
/home/vagrant/.vagrant.d/gems/gems/mediawiki-vagrant-0.2.0/lib/mediawiki-vagrant.rb:2:in `<module:MediaWikiVagrant>'
/home/vagrant/.vagrant.d/gems/gems/mediawiki-vagrant-0.2.0/lib/mediawiki-vagrant.rb:1:in `<top (required)>'
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:60:in `require'
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
/usr/lib/ruby/vendor_ruby/vagrant.rb:204:in `require_plugin'
/usr/lib/ruby/vendor_ruby/vagrant/environment.rb:760:in `block in load_plugins'
/usr/lib/ruby/vendor_ruby/vagrant/environment.rb:751:in `each'
/usr/lib/ruby/vendor_ruby/vagrant/environment.rb:751:in `load_plugins'
/usr/lib/ruby/vendor_ruby/vagrant/environment.rb:132:in `initialize'
/usr/bin/vagrant:105:in `new'
/usr/bin/vagrant:105:in `<main>'
 INFO interface: error: Failed to load the "mediawiki-vagrant" plugin. View logs for more details.

Failed to load the "mediawiki-vagrant" plugin. View logs for more details.
Comment 8 Gerrit Notification Bot 2014-10-15 23:23:27 UTC
Change 166913 had a related patch set uploaded by Dduvall:
Restore compatibility with vagrant 1.4

https://gerrit.wikimedia.org/r/166913
Comment 9 Gerrit Notification Bot 2014-10-19 00:44:40 UTC
Change 166913 merged by jenkins-bot:
Restore compatibility with vagrant 1.4

https://gerrit.wikimedia.org/r/166913

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


Navigation
Links