This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Append | |
def append_if_no_such_line(filename, line) | |
execute "cat '#{line}' >> #{filename}" do | |
not_if { "egrep -q '^#{line}$' #{filename}" } | |
end | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grantr@ip-10-194-154-112:~$ while /bin/true; do sudo knife search node 'role:gotime_sphinx AND app_environment:production' -i -c /etc/chef/client.rb | wc -l | grep -q 2 || date; sleep 60; done | |
/usr/lib/ruby/1.8/net/http.rb:2097:in `error!': 500 "Internal Server Error" (Net::HTTPFatalError) | |
from /usr/lib/ruby/gems/1.8/gems/chef-0.9.6/lib/chef/rest.rb:217:in `api_request' | |
from /usr/lib/ruby/gems/1.8/gems/chef-0.9.6/lib/chef/rest.rb:268:in `retriable_rest_request' | |
from /usr/lib/ruby/gems/1.8/gems/chef-0.9.6/lib/chef/rest.rb:198:in `api_request' | |
from /usr/lib/ruby/gems/1.8/gems/chef-0.9.6/lib/chef/rest.rb:101:in `get_rest' | |
from /usr/lib/ruby/gems/1.8/gems/chef-0.9.6/lib/chef/search/query.rb:37:in `search' | |
from /usr/lib/ruby/gems/1.8/gems/chef-0.9.6/lib/chef/knife/search.rb:67:in `run' | |
from /usr/lib/ruby/gems/1.8/gems/chef-0.9.6/lib/chef/application/knife.rb:115:in `run' | |
from /usr/lib/ruby/gems/1.8/gems/chef-0.9.6/bin/knife:25 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[13:53:19,495][DEBUG][action.search.type ] [Sandman] [revisions][2], node[1ca0c05b-612e-4ff4-bb9b-69551c5145cf], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@1644cd9a] | |
org.elasticsearch.search.SearchParseException: [revisions][2]: query[null],from[-1],size[-1]: Parse Failure [Failed to parse [ | |
{ | |
"query":{ | |
"field":{ | |
"created_at":"2010-08-25T20:42:09" } | |
} | |
} | |
]] | |
at org.elasticsearch.search.SearchService.parseSource(SearchService.java:365) |