Thanks for the reply Steven. The search started giving a 400 Bad Request in
Chef 11. Specifically all I was getting on the client end was this:
400 “Bad Request”
Digging deeper, I was able to figure out the root cause of my problem. The
issue is that my query had newline characters in it. So for instance, the
search(:node, “my_attribute:test AND (roles:first_role
This will work just fine with Chef 10 but will fail with Chef 11 with the
400 error. Removing the newlines, I was able to get it working for both
Do you think this is a bug or an expected behavior? I wasn’t able to find
any documentation surrounding this here.
On Tue, Jul 29, 2014 at 6:51 AM, Steven Danna email@example.com wrote:
The problem is this used to work fine with Chef 10 but has started
failing with Chef 11.
When you say that the search started to fail, do you mean that you are
receiving an error message or that the search no longer returns the
On Tue, Jul 29, 2014 at 7:13 AM, firstname.lastname@example.org
We are trying to run a little complex search query in one of our recipes
which looks something like:
search(:node, “my_attribute:test AND (roles:first_role OR
OR roles:third_role OR roles:fourth_role)”)
The idea being to retrieve all nodes which have a particular attribute
and has one of the given roles on its runlist. Is the above query the
way to write that? The problem is this used to work fine with Chef 10 but
has started failing with Chef 11.
Any help will be greatly appreciated.