# Chef-solo-search not working

**URL:** <https://discourse.chef.io/t/chef-solo-search-not-working/5610>\
**Category:** Chef Infra (archive)\
**Created:** [August 8, 2014, 9:24pm UTC](https://discourse.chef.io/t/chef-solo-search-not-working/5610 "2014-08-08T21:24:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Liam\_Kirsher](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/liam_kirsher/32/279_2.png) [@Liam\_Kirsher](https://discourse.chef.io/u/Liam_Kirsher)\
**Post date:** [August 8, 2014, 9:24pm UTC](https://discourse.chef.io/t/chef-solo-search-not-working/5610/1 "2014-08-08T21:24:48Z")

</div>

Hi --

Any ideas on this one? It used to work. I know there were some changes  
going from Chef 10 to 11, so I suspect it has something to do with  
that. For testing I added chef-solo-search to the dna.json file

> {"run\_list": ["recipe[chef-solo-search]","role[slave]"] }  
> But it was already in the recipe metatdata.rb file as a dependency.

> if Chef::Config[:solo]  
> 37: # This is using chef-solo-search, which looks in data bag  
> node/master.json  
> 38: master\_node = search(:node, 'name:master').first  
> 39: if master\_node.nil?  
> 40\>\> _raise "Master node not found!"_  
> 41: end

The solo.rb file has

> base = File.expand\_path('..', **FILE** )
> 
> nodes\_path File.join(base, 'nodes')  
> role\_path File.join(base, 'roles')  
> data\_bag\_path File.join(base, 'data\_bags')  
> encrypted\_data\_bag\_secret File.join(base, 'data\_bag\_key')  
> environment\_path File.join(base, 'environments')  
> environment "\_default"
> 
> cookbook\_path   
> cookbook\_path \<\< File.join(base, 'cookbooks-1') #  
> /home/liam/.rbenv/versions/1.9.3-p385/lib/ruby/gems/1.9.1/gems/knife-solo-0.4.0/lib/knife-solo/resources/patch\_cookbooks  
> cookbook\_path \<\< File.join(base, 'cookbooks-2') #  
> /home/liam/Documents/Client/chef-repo/cookbooks  
> cookbook\_path \<\< File.join(base, 'cookbooks-3') #  
> /home/liam/Documents/Client/chef-repo/site-cookbooks

The /data\_bags/ directory:

> data\_bags/node:  
> master.json  
> The master.json file  
> {  
> "id": "master",  
> "name": "master",  
> "chef\_environment": "\_default",  
> "json\_class": "Chef::Node",  
> "normal": {  
> },  
> "chef\_type": "node",

So,

--  
Liam Kirsher  
PGP: [http://liam.numenet.com/pgp/](http://liam.numenet.com/pgp/)
