schubergphilis / vagrant-chef-zero

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

The plugin should not try and update the _default environment #59

Open brettcave opened 9 years ago

brettcave commented 9 years ago

From looking at the chef-zero code, updates to _default will fail: https://github.com/opscode/chef-zero/blob/master/lib/chef_zero/endpoints/environment_endpoint.rb#L20

My chef-repo has environments/_default.json and https://github.com/andrewgross/vagrant-chef-zero/blob/master/lib/vagrant-chef-zero/action/upload.rb#L81 tries to update _default environment.

@conn.environment.update(environment) unless environment['name'] == '_default'

Not sure what the impact of this would be for environments with specific environment configurations / attributes etc, but I know I had to remove cookbook version constraints for environments in order to run chef-client in local-mode - it might be the same for chef-zero and so a safe bet to make this change.

andrewgross commented 9 years ago

Thanks for bringing this up @brettcave, I will have to investigate.

miguelaferreira commented 8 years ago

@brettcave are your till experiencing this issue? Or did you find a workaround?