Skip to content
This repository has been archived by the owner on Mar 19, 2022. It is now read-only.

data_bag search support doesn't work with chef 11.x #216

Closed
runningman84 opened this issue Mar 1, 2013 · 12 comments
Closed

data_bag search support doesn't work with chef 11.x #216

runningman84 opened this issue Mar 1, 2013 · 12 comments

Comments

@runningman84
Copy link

knife solo databag search doesn't work with chef 11.x

2013-02-26T08:34:08+01:00] WARN: Failed to read the private key /etc/chef/client.pem: #<Errno::ENOENT: No such file or directory - /etc/chef/client.pem>

Recipe Compile Error in /DBA/chef/chef-solo/cookbooks/dba/recipes/rpm.rb

Chef::Exceptions::PrivateKeyMissing

I cannot read /etc/chef/client.pem, which you told me to use to sign requests!

Cookbook Trace:

/DBA/chef/chef-solo/cookbooks/foo/recipes/rpm.rb:11:in from_file' /DBA/chef/chef-solo/cookbooks/foo/recipes/rpm.rb:8:infrom_file'

Relevant File Content:

/DBA/chef/chef-solo/cookbooks/foo/recipes/rpm.rb:

10: # search for all items in the 'components' data bag and loop over them
11>> search(:components, "cookbook:foo AND hostname:#{node[:fqdn]}") do |component|
12: if !component["id"]

@tmatilai
Copy link
Collaborator

tmatilai commented Mar 1, 2013

Yeah, I just two days ago saw this: edelight/chef-solo-search#18

@matschaffer
Copy link
Owner

Does the new cookbook work? If so we should probably pull that in.

@tmatilai
Copy link
Collaborator

tmatilai commented Mar 1, 2013

I have not tried it at all, just saw the issue. That cookbook does not seem to have versioning or make releases, so we just have to trust that master is stable. And test it ourselves of course. =)

@matschaffer
Copy link
Owner

I have been meaning to write an integration test on search ;)

-Mat

about.me/matschaffer

On Fri, Mar 1, 2013 at 9:03 AM, Teemu Matilainen
notifications@github.comwrote:

I have not tried it at all, just saw the issue. That cookbook does not
seem to have versioning or make releases, so we just have to trust that
master is stable. And test it ourselves of course. =)


Reply to this email directly or view it on GitHubhttps://github.com//issues/216#issuecomment-14290502
.

@runningman84
Copy link
Author

I tried the chef-solo-search cookbook with no luck. Maybe it is not designed to work with chef 11.x or it doesn't get along with knife solo...

@matschaffer
Copy link
Owner

Did you try the latest cookbook?
edelight/chef-solo-search#18 says that it should
work. If that cookbook works by itself (you may need to just do a manual
chef-solo rather than running through knife-solo). Then we should be okay
by just updating to the latest version.

Also if you have a test cookbook that I could use send it along and I'll
try to build an integration test so we notice these things sooner.

Thanks!

-Mat

about.me/matschaffer

On Mon, Mar 4, 2013 at 1:05 AM, runningman84 notifications@github.comwrote:

I tried the chef-solo-search cookbook with no luck. Maybe it is not
designed to work with chef 11.x or it doesn't get along with knife solo...


Reply to this email directly or view it on GitHubhttps://github.com//issues/216#issuecomment-14370661
.

@tjwallace
Copy link

@matschaffer @runningman84 I've had success with the latest chef-solo-search cookbook.

@matschaffer
Copy link
Owner

Sweet. Do you need this soon? If so we can do a patch release for it. Are
you using 0.2.0 or 0.3.0.pre?

-Mat

On Mar 4, 2013, at 9:53, Jeff Wallace notifications@github.com wrote:

@matschaffer https://github.com/matschaffer
@runningman84https://github.com/runningman84I've had success with
the latest chef-solo-search cookbook.


Reply to this email directly or view it on
GitHubhttps://github.com//issues/216#issuecomment-14394252
.

@tjwallace
Copy link

@matschaffer I'm using 0.2.0. No rush on the release: I've added cookbook 'solo-search', git: "https://github.com/edelight/chef-solo-search.git" to my Cheffile so search is working great.

@matschaffer
Copy link
Owner

Oh sweet. I'm glad to know that works. I worried that our injection of the
cookbooks might preclude that. Thanks for testing!

-Mat

On Mar 4, 2013, at 17:23, Jeff Wallace notifications@github.com wrote:

@matschaffer https://github.com/matschaffer I'm using 0.2.0. No rush on
the release: I've added cookbook 'solo-search', git: "
https://github.com/edelight/chef-solo-search.git" to my Cheffile so search
is working great.


Reply to this email directly or view it on
GitHubhttps://github.com//issues/216#issuecomment-14418194
.

@runningman84
Copy link
Author

Hmm a new release would be great. All new servers who get prepared via knife prepare cannot be cooked anymore cause all of my cookboos do some databag search.

How exactly can I use the chef-solo-search cookbook with knife-solo? Just storing the whole cookbook next to my other cookbooks didn't help.

@tjwallace
Copy link

@runningman84 I forgot to mention in my previous comment that you have to add recipe[chef-solo-search] to your run_list as well.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants