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

uninitialized constant Module::ChefVault #93

Open
atoulme opened this issue Sep 27, 2014 · 0 comments
Open

uninitialized constant Module::ChefVault #93

atoulme opened this issue Sep 27, 2014 · 0 comments

Comments

@atoulme
Copy link
Contributor

atoulme commented Sep 27, 2014

Apparently the cookbook depends optionally on chef-vault, but if you don't set it on, you get this exception:

==> default: NameError
==> default: ---------
==> default: uninitialized constant Module::ChefVault
==> default: 
==> default: 
==> default: Cookbook Trace:
==> default: ---------------
==> default:   /tmp/vagrant-chef-3/chef-solo-1/cookbooks/nexus/libraries/chef_nexus.rb:231:in `rescue in encrypted_data_bag_item'
==> default: 
==> default:   /tmp/vagrant-chef-3/chef-solo-1/cookbooks/nexus/libraries/chef_nexus.rb:215:in `encrypted_data_bag_item'
==> default: 
==> default:   /tmp/vagrant-chef-3/chef-solo-1/cookbooks/nexus/libraries/chef_nexus.rb:203:in `encrypted_data_bag_for'
==> default: 
==> default:   /tmp/vagrant-chef-3/chef-solo-1/cookbooks/nexus/libraries/chef_nexus.rb:67:in `get_ssl_files_data_bag'
==> default: 
==> default:   /tmp/vagrant-chef-3/chef-solo-1/cookbooks/nexus/recipes/app_server_proxy.rb:47:in `from_file'
==> default: 
==> default:   /tmp/vagrant-chef-3/chef-solo-1/cookbooks/nexus/recipes/default.rb:28:in `from_file'
==> default: 
==> default:   /tmp/vagrant-chef-3/chef-solo-1/cookbooks/pizzabox/recipes/workbench.rb:17:in `from_file'
==> default: 
==> default: 
==> default: Relevant File Content:
==> default: ----------------------
==> default: /tmp/vagrant-chef-3/chef-solo-1/cookbooks/nexus/libraries/chef_nexus.rb:
==> default: 
==> default: 224:          # chef_data_bag_item.rb fails to handle scenario of missing data bag :-(,
==> default: 225:          # it reports this as Chef::Exceptions::ValidationFailed exception.
==> default: 226:          # Adding a different rescue block if things exception needs to be handled differently
==> default: 227:          rescue Chef::Exceptions::ValidationFailed => e
==> default: 228:            nil
==> default: 229:  
==> default: 230:          # if you are using vault and if data bag it not present we need to handle that exception as well
==> default: 231>>         rescue ChefVault::Exceptions::KeysNotFound
==> default: 232:            nil
==> default: 233:          end
==> default: 234:      end
==> default: 235:    end
==> default: 236:  end
atoulme added a commit to atoulme/nexus-cookbook that referenced this issue Sep 27, 2014
@atoulme atoulme mentioned this issue Sep 27, 2014
atoulme added a commit to atoulme/nexus-cookbook that referenced this issue Sep 27, 2014
atoulme added a commit to atoulme/nexus-cookbook that referenced this issue Sep 27, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant