chef-api
chef-api copied to clipboard
Is there a row limit?
Hi Guys!,
Just wanted to know if this module has some kind of limit when searching for multiple nodes. Im using partialSearch method and no matter what I do, I only get 1000 rows as response. Althoug when manually run "knife node list" on that environment, I get 1396 nodes, which is the right number of nodes I should be getting.
Can someone advise how to fix this?
Extract of code :
chef.config(SetOptions(environment));
console.log("About to search for any servers ...");
chef.partialSearch('node',
{
q: "name:*"
},
{
name: ['name'] ,
'ipaddress': ['ipaddress'] ,
'chef_environment': ['chef_environment'] ,
'ip6address': ['ip6address'],
'run_list': ['run_list'],
'chef_client': ['chef_client'],
'ohai_time': ['ohai_time']
}
, function(err, chefRes) {
Just letting anyone reading this know that I forked and I fix this myself on this link : https://github.com/elMatidelUru/chef-api/blob/master/methods/search.js
But HAVE IN MIND that I only fixed it for my use case, which means, only partialSearch method. You need to make changes your self if you want to extend that to other methods.