schubergphilis / vagrant-chef-zero

Vagrant Plugin for Chef Zero
Apache License 2.0
91 stars 41 forks source link

chef-zero provisioner looks for Chef Server URL and fails #61

Closed scarolan closed 9 years ago

scarolan commented 9 years ago

When I try to use this provisioner with Vagrant, I get the following errors. Why is it looking for a server URL? Shouldn't it default to something like localhost:8889?

There are errors in the configuration of this machine. Please fix
the following errors and try again:

chef client provisioner:
* Chef Server URL must be populated.
* Validation key path must be valid path to your Chef Server validation key.

My vagrant plugin list: vagrant-aws (0.5.0) vagrant-berkshelf (4.0.1) vagrant-cachier (1.1.0) vagrant-chef-zero (0.7.1) vagrant-hostsupdater (0.0.11) vagrant-ohai (0.1.7) vagrant-omnibus (1.4.1) vagrant-share (1.1.4, system) vagrant-vmware-fusion (3.1.2)

The relevant part of my Vagrantfile: w.vm.provision :chef_client do |chef| chef.node_name = config.vm.hostname chef.run_list = [ "recipe[training-laptop::default]" ] end

egorelik commented 9 years ago

Found the same issue with latest version of Vagrant. Works fine with previous one (1.6.5)

amandasaurus commented 9 years ago

I am also getting this problem on Vagrant 1.7.2

ismailfaruqi commented 9 years ago

I have this issue too... still looking for the solution...

miguelaferreira commented 9 years ago

Same here :-1:

Paxa commented 9 years ago

@ismailfaruqi, it's here https://github.com/miguelaferreira/vagrant-chef-zero/commit/ee2b8df81803c4e56c433a3ad1e4347d7084f519

miguelaferreira commented 9 years ago

@ismailfaruqi @Paxa, IMHO a better fix by @wzin here a48312b

djpate commented 9 years ago

I'm still getting this error on vagrant 1.7.2

➜  vagrant_vms  vagrant plugin list
vagrant-berkshelf (4.0.3)
vagrant-chef-zero (0.7.1)
vagrant-omnibus (1.4.1)
vagrant-share (1.1.3, system)
vagrant-vbguest (0.10.0)
➜  vagrant_vms  vagrant reload
Vagrant.require_plugin is deprecated and has no effect any longer.
Use `vagrant plugin` commands to manage plugins. This warning will
be removed in the next version of Vagrant.
There are errors in the configuration of this machine. Please fix
the following errors and try again:

chef client provisioner:
* Chef Server URL must be populated.
* Validation key path must be valid path to your Chef Server validation key.
miguelaferreira commented 9 years ago

A new gem with the latest fixes has not yet been released. Our bad! We will work on getting that out.

Meanwhile, could you please build from source and try again?

1) clone the repo 2) in the repo do: gem build vagrant-chef-zero.gemspec 3) in the repo do: vagrant plugin install vagrant-chef-zero-0.7.1.gem

miguelaferreira commented 9 years ago

A new gem was released last Friday that contains the fixes for this issue. Closing the issue.

lukas0krupa commented 9 years ago

@miguelaferreira I saw that there were version 4.2.2 of chef-zero gem from 19 May. Is that version that have this fixed ?

I currently have version 4.2.3, but issue appears again (chef solo/zero provisioner ask for chef server url)

miguelaferreira commented 9 years ago

Hi @lukas0krupa The fix I mentioned was in vagrant-chef-zerogem (version 1.0.1), not chef-zero gem.

You can find it here: https://rubygems.org/gems/vagrant-chef-zero