I have a chef 12.11.1 server with 1278 nodes. If I do either
knife node list | wc -l
-or-
knife search node “*” -i | wc -l
I get 1278 nodes. These are all linux hosts and that’s about the number I expect. However, when I do a:
knife ssh “:” – hostname
I only get 996 lines of results. What’s more telling, even if I alter the search a bit, I always get 996 lines back.
For example, I have some hosts that are currently turned off. If I don’t exclude those hosts, I get one error line for each host that it cannot SSH into. The total lines returned is 996. If I do exclude them, the error lines are gone, but I still get 996 lines of output. If I exclude a few other hosts, I still get 996 lines of results.
So it seems that somewhere, I’m hitting a limit. I’ve tried this with a “knife ssh -VV” and I get the following:
jrhodes-mbp:chef-repo jrhodes$ knife ssh -VV -x root "*:*" -- hostname
INFO: Using configuration from /Users/jrhodes/workspace/chef-repo/.chef/knife.rb
DEBUG: Chef::HTTP calling Chef::HTTP::JSONInput#handle_request
DEBUG: Chef::HTTP calling Chef::HTTP::JSONOutput#handle_request
DEBUG: Chef::HTTP calling Chef::HTTP::CookieManager#handle_request
DEBUG: Chef::HTTP calling Chef::HTTP::Decompressor#handle_request
DEBUG: Chef::HTTP calling Chef::HTTP::Authenticator#handle_request
DEBUG: Signing the request as jrhodes
DEBUG: Chef::HTTP calling Chef::HTTP::RemoteRequestID#handle_request
DEBUG: Chef::HTTP calling Chef::HTTP::ValidateContentLength#handle_request
DEBUG: Initiating GET to https://vap-chef.tpn.thinkingphones.net/organizations/fuze/search/node?q=*:*&sort=X_CHEF_id_CHEF_X%20asc&start=0
DEBUG: ---- HTTP Request Header Data: ----
DEBUG: Accept: application/json
DEBUG: Accept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3
DEBUG: X-Ops-Server-API-Version: 1
DEBUG: X-OPS-SIGN: algorithm=sha1;version=1.1;
DEBUG: X-OPS-USERID: jrhodes
DEBUG: X-OPS-TIMESTAMP: 2017-01-19T13:33:25Z
DEBUG: X-OPS-CONTENT-HASH: 2jmj7l5rSw0yVb/vlWAYkK/YBwk=
DEBUG: X-OPS-AUTHORIZATION-1: removed
DEBUG: X-OPS-AUTHORIZATION-2: removed
DEBUG: X-OPS-AUTHORIZATION-3: removed
DEBUG: X-OPS-AUTHORIZATION-4: removed
DEBUG: X-OPS-AUTHORIZATION-5: removed
DEBUG: X-OPS-AUTHORIZATION-6: removed
DEBUG: HOST: vap-chef.tpn.thinkingphones.net:443
DEBUG: X-REMOTE-REQUEST-ID: 20499a7e-cdb3-4705-8c6c-2221807920df
DEBUG: ---- End HTTP Request Header Data ----
DEBUG: ---- HTTP Status and Header Data: ----
DEBUG: HTTP 1.1 200 OK
DEBUG: date: Thu, 19 Jan 2017 13:33:27 GMT
DEBUG: content-type: application/json
DEBUG: transfer-encoding: chunked
DEBUG: connection: close
DEBUG: server: openresty/1.11.2.1
DEBUG: x-ops-server-api-version: {"min_version":"0","max_version":"1","request_version":"1","response_version":"1"}
DEBUG: x-ops-api-info: flavor=cs;version=12.0.0;oc_erchef=12.11.1+20161118001025
DEBUG: content-encoding: gzip
DEBUG: ---- End HTTP Status/Header Data ----
DEBUG: Chef::HTTP calling Chef::HTTP::ValidateContentLength#handle_response
DEBUG: HTTP server did not include a Content-Length header in response, cannot identify truncated downloads.
DEBUG: Chef::HTTP calling Chef::HTTP::RemoteRequestID#handle_response
DEBUG: Chef::HTTP calling Chef::HTTP::Authenticator#handle_response
DEBUG: Chef::HTTP calling Chef::HTTP::Decompressor#handle_response
DEBUG: Decompressing gzip response
DEBUG: Chef::HTTP calling Chef::HTTP::CookieManager#handle_response
DEBUG: Chef::HTTP calling Chef::HTTP::JSONOutput#handle_response
DEBUG: Chef::HTTP calling Chef::HTTP::JSONInput#handle_response
DEBUG: Using node attribute 'fqdn' as the ssh target
DEBUG: Using node attribute 'fqdn' as the ssh target
I’ve tried this on several different hosts (Mac OS X 10.12 and CentOS 6.8) with the same results. I originally tried this with chef-client/knife 12.4.3, but I get the same results after I upgraded to chef-client/knife 12.17.44.
I’ve also tried limiting things with concurrency (“knife ssh -C 100…”) and I still get 996 lines of output.
Is there a config switch somewhere to be able to “knife ssh” into more than what seems like 1000 hosts?
I’m not seeing any obvious errors in my chef server logs, but I could be missing something.