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

Missing plugin (and provisioner) has terrible messaging #5902

Closed
jwhitley opened this issue Jul 8, 2015 · 4 comments
Closed

Missing plugin (and provisioner) has terrible messaging #5902

jwhitley opened this issue Jul 8, 2015 · 4 comments

Comments

@jwhitley
Copy link

jwhitley commented Jul 8, 2015

Repro steps

  1. Create a simple Vagrantfile that uses the vagrant-host-shell plugin, which implements the :host_shell provisioner. Add a line to the Vagrantfile using it, ala:
config.vm.provision :host_shell, inline: "echo 'Found backup file; loading into development database.'"
  1. Important: do not install the plugin yet, or uninstall it if it's already present.
  2. vagrant up

Actual results

>> vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
There are errors in the configuration of this machine. Please fix
the following errors and try again:

vm:
* The '' provisioner could not be found.

There are two problems here. First, the dependency on vagrant-host-shell is implicit. A developer new to this project now has to hunt around to figure out what's missing. Perhaps there's a pattern for expressing plugin dependencies in Vagrantfile, but that wasn't clear from the docs. (And I note that an old declaration pattern was deprecated.) For sanity, I'll now have to code something ad-hoc to provide a clear, actionable error.

Second, the messaging about the missing provider has an outright bug, in that it's not reporting that :host_shell was the provisioner. (E.g. The '' provisioner could not be found)

Expected results

  1. It should be possible to declare plugin dependencies so that missing plugins can be clearly reported, enabling developers to immediately fix the problem and get back to work.
  2. The missing provisioner should be reported by the identifier used in the file, :host_shell.

Related issues
#1700, which is closed but the outsourced solution (Vundler) is long-abandoned, and never worked with Vagrant > 1.3.

@mitchellh
Copy link
Contributor

Fixed

@mitchellh
Copy link
Contributor

Sorry, by fixed I will clarify that I fixed the error messaging for a missing provisioner.

Declaring plugin dependencies is tracked in another issue that is still open but can't find, but something like "local plugins".

@jwhitley
Copy link
Author

jwhitley commented Jul 9, 2015

Awesome, thanks for the quick patch.

@mitchellh the best I can find that's open is #4347, is that the one you were thinking of?

@mitchellh
Copy link
Contributor

That sounds right!

@hashicorp hashicorp locked and limited conversation to collaborators Apr 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants