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

Stop using vagrant-triggers for Vagrant >= 2.1.0 #49

Open
l3ku opened this issue May 4, 2018 · 6 comments

Comments

Projects
None yet
3 participants
@l3ku
Copy link
Member

commented May 4, 2018

When attempting to run vagrant up on Vagrant version 2.1.0 with vagrant-triggers installed, the command produces a warning and fails as a result of an exception:

$ vagrant up
WARNING: Vagrant has detected the `vagrant-triggers` plugin. This plugin conflicts
with the internal triggers implementation. Please uninstall the `vagrant-triggers`
plugin and run the command again if you wish to use the core trigger feature. To
uninstall the plugin, run the command shown below:

  vagrant plugin uninstall vagrant-triggers

Note that the community plugin `vagrant-triggers` and the core trigger feature
in Vagrant do not have compatible syntax.

To disable this warning, set the environment variable `VAGRANT_USE_VAGRANT_TRIGGERS`.
Bringing machine 'wordpress-box' up with 'virtualbox' provider...
/opt/vagrant/embedded/gems/2.1.0/gems/vagrant-2.1.0/lib/vagrant/plugin/v2/config.rb:73:in `method_missing': undefined method `before_triggers' for #<VagrantPlugins::Triggers::Config::Trigger:0x0000000100baca38> (NoMethodError)
	from /opt/vagrant/embedded/gems/2.1.0/gems/vagrant-2.1.0/lib/vagrant/plugin/v2/trigger.rb:40:in `fire_triggers'
	from /opt/vagrant/embedded/gems/2.1.0/gems/vagrant-2.1.0/lib/vagrant/machine.rb:164:in `action'
	from /opt/vagrant/embedded/gems/2.1.0/gems/vagrant-2.1.0/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'

According to https://www.vagrantup.com/docs/triggers/, it seems that Vagrant has its own trigger mechanism which conflicts with the vagrant-triggers plugin. We should probably move away from external plugins and investigate if we could start using Vagrant's own mechanism for newer Vagrant versions, and eventually deprecate the vagrant-triggers plugin.

@l3ku

This comment has been minimized.

Copy link
Member Author

commented May 18, 2018

Related: should we add a constraint to the Vagrantfile our WordPress layout to restrict usage with version >= 2.1.0 of Vagrant? Currently we require at least version 1.7.4, but there is no upper limit. As a result, if a developer follows the instructions at https://seravo.com/docs/development/how-to-install/ and attempts to run vagrant with our WP layout, he/she will face the error stated above.

@Aaronkala

This comment has been minimized.

Copy link

commented Jul 17, 2018

Is there any way to bypass this issue? Or should I just downgrade vagrant to an older version (< 2.1.0)?

@l3ku

This comment has been minimized.

Copy link
Member Author

commented Jul 17, 2018

Hi! As a temporal workaround, you could try setting the suggested VAGRANT_USE_VAGRANT_TRIGGERS environment variable to disable the warning and see if that works for you. However, I myself have still kept to using an earlier Vagrant version (2.0.2) running on OSX.

@ottok

This comment has been minimized.

Copy link
Member

commented Sep 11, 2018

The current work-around is to install a Vagrant version older than 2.10. You can find 2.0.4 at https://releases.hashicorp.com/vagrant/2.0.4/

@ottok ottok added the bug label Sep 11, 2018

@ottok

This comment has been minimized.

Copy link
Member

commented Sep 11, 2018

See duplicate of this at Seravo/wordpress#88

@ottok

This comment has been minimized.

Copy link
Member

commented Sep 11, 2018

This will be fixed as part of a currently on-going refactoring of the whole Vagrant bootstrap process. In the mean time added this note to docs: Seravo/docs@70bb7ec

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.