The worker1 node contains ktc-compute the control node does not. Our code does a search for this recipe.
The following is shef output on the worker1 node ( both nodes produce the same output )
chef > resp = search("node", "recipes:ktc-compute")
=> [node[control], node[worker1]]
chef > resp = search(:node, "recipes:ktc-computeaaa")
=> [node[control], node[worker1]]
chef > resp = search("node", "run_list:ktc-aaa")
=> [node[control], node[worker1]]
chef > resp = search("node", "run_list:k")
=> []
chef > resp = search("node", "run_list:kt")
=> []
chef > resp = search("node", "run_list:ktc")
=> [node[control], node[worker1]]
chef > resp = search("node", "recipes:ktc-")
[2013-08-02T15:25:24+09:00] ERROR: Server returned error for http://192.168.31.86:4000/search/node?q=recipes:ktc-&sort=X_CHEF_id_CHEF_X%20asc&start=0&rows=1000, retrying 1/5 in 3s
^[[A^[[A[2013-08-02T15:25:27+09:00] ERROR: Server returned error for http://192.168.31.86:4000/search/node?q=recipes:ktc-&sort=X_CHEF_id_CHEF_X%20asc&start=0&rows=1000, retrying 2/5 in 5s
^CIRB::Abort: abort then interrupt!
(stack trace removed)
chef > resp = search("node", "run_list:ktc\-compute")
=> [node[control], node[worker1]]
chef > resp = search("node", "recipes:ktc\\-compute")
=> [node[worker1]]
It appears the - is being interpreted as a wildcard of sorts and the search does not work correctly unless it is escaped.
This was tested on a real chef server & works as expected: search("node", "recipes:ktc-compute") returns the worker1 node, the others return nothing or an error.
It looks a lot like we're not breaking recipe[ktc-compute] up the way solr expects. Probably - needs to remain part of a word. I'll take a look, thanks!
We're using vagrant + chef-zero for dev & noticed an odd search behavior. There are 2 nodes running concurrently with different sets of recipes:
The worker1 node contains ktc-compute the control node does not. Our code does a search for this recipe.
The following is shef output on the worker1 node ( both nodes produce the same output )
It appears the - is being interpreted as a wildcard of sorts and the search does not work correctly unless it is escaped.
This was tested on a real chef server & works as expected: search("node", "recipes:ktc-compute") returns the worker1 node, the others return nothing or an error.