Chef-solo-search not working


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
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’) #
cookbook_path << File.join(base, ‘cookbooks-2’) #
cookbook_path << File.join(base, ‘cookbooks-3’) #

The /data_bags/ directory:

The master.json file
“id”: “master”,
“name”: “master”,
“chef_environment”: “_default”,
“json_class”: “Chef::Node”,
“normal”: {
“chef_type”: “node”,


Liam Kirsher