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

Made data bag retreival compatible with vagrant, chef solo, and knife solo #58

Closed
wants to merge 1 commit into from

Conversation

btomasini
Copy link

I found I was not able to run this cookbook using vagrant, chef solo, and knife solo for locally stored data bags. This change catches the exception I found was thrown when a data bag was not found in this type of vagrant environment.

@KAllan357
Copy link
Contributor

I'm not sure if this is an exception I'd want to just eat, as it usually means something bad.

I pushed up some changes this morning and released a 3.0.0 version of this cookbook to the Opscode Community site. If you don't mind trying out Nexus 2.7, could you give that a try and see if it works for you?

@btomasini
Copy link
Author

That makes sense. I only put in this "wide" catch block since it seemed it matched the other "wide" catch for the http exception - which seemed to me would be thrown with any exception from the chef server.

I am nearly positive I encountered this problem with the 3.0.0 cookbook. I will double check.

@praste
Copy link
Contributor

praste commented Jun 13, 2014

@KAllan357 and @btomasini
I encountered exact same problem and added exacct same check (I wish I had looked at this issue early on.) Current logic to load databags doesn't seem to work with chef-solo. As noted in issue #85, it looks like cookbook first tries to load databag using environment name '_default' and when no databag item is found while retrieving credentials it throws a exception

KAllan357 added a commit that referenced this pull request Jul 17, 2014
Fix for issue #58, issue #83 and Issue #87
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

Successfully merging this pull request may close these issues.

3 participants