schubergphilis / vagrant-chef-zero

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

plugin is not compatible with vagrant 1.4 #29

Open ramonskie opened 10 years ago

ramonskie commented 10 years ago

i saw this pull request https://github.com/andrewgross/vagrant-chef-zero/pull/28 a few days ago but it seems that this is not been released yet

tas50 commented 10 years ago

Any chance we could get a new release with #28 included?

andrewgross commented 10 years ago

Working on getting my environment working, will try to get this out by the end of tonight.

andrewgross commented 10 years ago

Pushed 0.5.2 with this merged in, let me know if you are having issues.

ramonskie commented 10 years ago

0.5.2 does not work with vagrant-berkshelf plugin there are dependency issues with ridley

tnarik commented 10 years ago

I tried to get the dependencies working by using the following set of plugins:

vagrant-berkshelf (1.4.0.dev1)
vagrant-chef-zero (0.5.2)
vagrant-omnibus (1.1.2)

They install and load so as far as I can tell there are no dependency issues, but when using vagrant up I am getting the following error:

E, [2013-12-16T10:58:30.971227 #82141] ERROR -- : Ridley::Client::ConnectionSupervisor crashed!
KeyError: key not found: :retries
    /Applications/Vagrant/embedded/gems/gems/i18n-0.6.9/lib/i18n/core_ext/hash.rb:4:in `fetch'
    /Applications/Vagrant/embedded/gems/gems/i18n-0.6.9/lib/i18n/core_ext/hash.rb:4:in `block in slice'
    /Applications/Vagrant/embedded/gems/gems/i18n-0.6.9/lib/i18n/core_ext/hash.rb:4:in `each'
    /Applications/Vagrant/embedded/gems/gems/i18n-0.6.9/lib/i18n/core_ext/hash.rb:4:in `slice'
    /Users/tnarik/.vagrant.d/gems/gems/ridley-2.4.0/lib/ridley/client.rb:11:in `initialize'
    /Users/tnarik/.vagrant.d/gems/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in `public_send'
    /Users/tnarik/.vagrant.d/gems/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in `dispatch'
    /Users/tnarik/.vagrant.d/gems/gems/celluloid-0.15.2/lib/celluloid/calls.rb:67:in `dispatch'
    /Users/tnarik/.vagrant.d/gems/gems/celluloid-0.15.2/lib/celluloid/actor.rb:322:in `block in handle_message'
    /Users/tnarik/.vagrant.d/gems/gems/celluloid-0.15.2/lib/celluloid/actor.rb:416:in `block in task'
    /Users/tnarik/.vagrant.d/gems/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:55:in `block in initialize'
    /Users/tnarik/.vagrant.d/gems/gems/celluloid-0.15.2/lib/celluloid/tasks/task_fiber.rb:13:in `block in create'
E, [2013-12-16T10:58:30.971536 #82141] ERROR -- : Ridley::Client crashed!
KeyError: key not found: :retries
[...]

I am trying to track the issue down to hopefully some missing configuration on my side.

tnarik commented 10 years ago

The issue seems to be related to a clash between i18n and activesupport implementation of Hash#slice.

andrewgross commented 10 years ago

Thanks @tnarik. I am working on removing the activesupport gem if at all possible. Unfortunately I have run into some opaque ruby dependency issues when I removed it in the past.

andrewgross commented 10 years ago

With vagrant 1.4 I have been able to remove a lot of the dependency locking for i18n and activesupport, removing them entirely from my explicit requirements. Check out 0.6.0

moleculezz commented 10 years ago

Hi there, I'm having similar issue using vagrant 1.4.3.

plugin versions:

vagrant-berkshelf (1.4.0.dev1)
vagrant-chef-zero (0.6.0)
vagrant-omnibus (1.2.1)

Had some issues with vagrant-berkshelf plugin so I followed these instructions: https://github.com/berkshelf/vagrant-berkshelf/issues/111#issuecomment-32619642

I ran vagrant up --debug, and this is what I get as result:

INFO warden: Calling IN action: #<VagrantPlugins::ChefZero::Action::Start:0x00000100a225f0>
INFO warden: Calling IN action: #<VagrantPlugins::ChefZero::Action::Upload:0x00000100a21ec0>
E, [2014-01-17T17:41:43.041819 #31642] ERROR -- : Ridley::Client::ConnectionSupervisor crashed!
KeyError: key not found: :retries
eherot commented 10 years ago

Seconding this one. I experienced this as well with plugin version 0.6.0, berkshelf-3.0.0.beta5, and vagrant-berkshelf-1.4.0.dev1.

andrewgross commented 10 years ago

Thanks for the update, will try to replicate.

sammarx commented 10 years ago

Any update on this? I was just trying to get the whole vagrant chef zero toolchain working, and I ran into the "KeyError: key not found: :retries" error. I'm only using vagrant-omnibus and vagrant-chef-zero.

eherot commented 10 years ago

@sammarx note that the Chef folks have officially deprecated the Vagrant-Berkshelf process in favor of other approaches (such as test kitchen), which would allow you to work around this problem. https://sethvargo.com/the-future-of-vagrant-berkshelf/

sammarx commented 10 years ago

@eherot I'm not actually using berkshelf, just chef-zero and vagrant.

jeffbyrnes commented 10 years ago

Also important to call out @andrewgross's comment on that post.

eherot commented 10 years ago

@sammarx to add some significance to the comment @jeffbyrnes pointed to, test-kitchen is now the preferred method of testing chef cookbooks, and it effectively deprecates the entire Vagrant chef plugin pool (including chef-zero). Test kitchen gives you a different way to use chef-zero with Vagrant to test cookbooks, even without Berkshelf (although I would highly recommend using Berkshelf).

sammarx commented 10 years ago

@eherot that makes sense. It looks like it's time to switch my workflow over to test kitchen.

mattray commented 10 years ago

FWIW over in the Chef/OpenStack cookbooks, we hit this and we're dropping vagrant-berkshelf as well. We're using

berks install --path=.cookbooks

before running Vagrant and we've added the following to our Vagrantfiles:

config.chef_zero.cookbooks = ".cookbooks"
andrewgross commented 10 years ago

Hey all,

Sorry for the neglect on this project, I've been sidetracked.

I certainly agree with Seth's comments in that post. It is very hard to work within Vagrant when creating and maintaining plugins. I currently plan to support this plugin since I know that people still use it. However, I am of the opinion that the overall approach taken by test kitchen may be more appropriate for the use case of creating a testing pipeline. This plugin seems more useful for when you want to have an interactive environment while prototyping new changes.

nogweii commented 10 years ago

I'm fairly sure that the problem stems from Ridley's use of Hash#slice, like @tnarik had mentioned. @coderanger had also noticed a similar situation and filled a bug report on Ridley -- https://github.com/RiotGames/ridley/pull/255

jjasghar commented 10 years ago

I have a feeling this is tied to https://github.com/andrewgross/vagrant-chef-zero/issues/51 also.