Vagrant: syntax error with vagrant file

Created on 7 Jul 2018  ยท  4Comments  ยท  Source: hashicorp/vagrant

Hello everyone,
i am trying to install openedx using the latest release "Native: open-release/ginkgo.master". I started the script to face this error

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: /home/habi/Desktop/openEDX/devstack/Vagrantfile
Line number: 3
Message: RuntimeError: Please install the vagrant-vbguest plugin by running `vagrant plugin install vagrant-vbguest`

So it i try to install the plugin, to get the same error!

$ vagrant plugin install vagrant-vbguest
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: /home/habi/Desktop/openEDX/devstack/Vagrantfile
Line number: 3
Message: RuntimeError: Please install the vagrant-vbguest plugin by running `vagrant plugin install vagrant-vbguest`

So, I removed the Vagrantfile and reinstalled the plugin this time it installed successfully. I tried to run the install script again, and it gave the same error.

Vagrant version

Vagrant 2.1.2

Host operating system

same error on Ubuntu 16.04 and 18.04.

Guest operating system

Openedx so, i guess ubuntu 16.04

Vagrantfile "the part that hvae the problem"

Vagrant.require_version ">= 1.8.7"
unless Vagrant.has_plugin?("vagrant-vbguest")
  raise "Please install the vagrant-vbguest plugin by running `vagrant plugin install vagrant-vbguest`"
end

VAGRANTFILE_API_VERSION = "2"

MEMORY = 4096
CPU_COUNT = 2

link to the whole file
I am not sure if it is a problem with vagrant or openedx , so excuse me if this is the wrong place.
best regards

bug core

All 4 comments

I'm having the same issue with plugins as well. When attempting to run vagrant plugin install <plugin name> from the directory with the Vagrantfile, the install fails because it seems to be parsing the Vagrantfile and looking for the plugin before it actually installs it and fails. Moving out of the directory containing the Vagrantfile and running the plugin install command successfully installs the plugin. I'm on 2.1.2. I was previously on 2.0.3 and this wasn't an issue.

Edit: I've narrowed this down to a change between v2.1.1 and v2.1.2. 2.1.1 and lower don't have this issue.

I think this is related to #9808. Someone ran into a related issue to try to revert part of that in #9996, but that change was rejected.

It seems the pattern of raising errors in Vagrantfile when plugins aren't installed may no longer be a valid use case?

Fixed by #10199

Cheers!

I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mpontillo picture mpontillo  ยท  3Comments

cbednarski picture cbednarski  ยท  3Comments

StefanScherer picture StefanScherer  ยท  3Comments

barkingfoodog picture barkingfoodog  ยท  3Comments

bbaassssiiee picture bbaassssiiee  ยท  3Comments