Skip to content

Instantly share code, notes, and snippets.

@cwjohnston
Created May 11, 2010 19:09
Show Gist options
  • Save cwjohnston/397711 to your computer and use it in GitHub Desktop.
Save cwjohnston/397711 to your computer and use it in GitHub Desktop.
Knife search works:
precursor:chef-repo cwj$ knife search node "run_list:role\[es_manager\]" | egrep fqdn
"fqdn": "master.drp.es.bluecoat.com",
"server_fqdn": "chef.drp.es.bluecoat.com",
search in recipe does not:
search(:node, "run_list:role\[es_manager\]") do |manager|
if manager[:fqdn].empty?
log "Could not find a local apt-cacher-ng proxy"
proxy = nil
else
log "Found local apt-cacher-ng on #{manager[:fqdn]}, will use this node as an http proxy for pbuilder."
proxy = manager[:fdqn]
end
end
yields:
WARN: HTTP Request Returned 500 Internal Server Error: 400 "org.apache.lucene.queryParser.ParseException: Cannot parse 'run_list:role[es_manager]': Encountered \" \"]\" \"] \"\" at line 1, column 24. Was expecting one of: \"TO\" ... <RANGEIN_QUOTED> ... <RANGEIN_GOOP> ... "
/usr/lib/ruby/1.8/net/http.rb:2101:in `error!': 500 "Internal Server Error" (Net::HTTPFatalError)
@allanca
Copy link

allanca commented Jul 22, 2010

I found this from googling for solutions to the same problem. You get anywhere on figuring this out?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment