Unable to retrieve over 100 machines in vRO workflow or vRA UI/API call
search cancel

Unable to retrieve over 100 machines in vRO workflow or vRA UI/API call

book

Article ID: 314682

calendar_today

Updated On:

Products

VMware

Issue/Introduction

Symptoms:
  • Retrieving over 100 machines in vRealize Orchestrator (vRO) workflow or vRealize Automation (vRA) UI/API call fails.
  • In the vRealize Orchestrator server.log file, you see entries similar to:

    016-12-22 13:22:23.689+0000 [https-jsse-nio-0.0.0.0-8281-exec-7] ERROR {} [ResponseErrorHandler] [Rest Composite Exception]: ( [Rest Error]: {Status code: 400}, {Error code: 20152} , {Error Source: null}, {Error Msg: Error while retrieving resources from provider [Infrastructure Service] for resource type [Machine].}, {System Msg: Error while retrieving resources from provider [{[email protected]}] for resource type [{com.vmware.csp.component.iaas.proxy.provider@resource.type.registration.name.Infrastructure.Machine}].} ) ( [Rest Error]: {Status code: 400}, {Error code: 42000} , {Error Source: null}, {Error Msg: Request was denied due to exceeded resource size limit. The maximum number of resources allowed is 100.}, {System Msg: Infrastructure service provider error: Request was denied due to exceeded resource size limit. The maximum number of resources allowed is 100.} )
    2016-12-22 13:22:23.690+0000 [https-jsse-nio-0.0.0.0-8281-exec-7] ERROR {} [InventoryService] findChildrenInRelation error! host: everyone (a26127ad-e702-4662-8c8a-1abcdcf98669), type: VCACHost, id: a26127ad-e702-4662-8c8a-1abcdcf98669, relationName: CatalogResource, exception: com.vmware.vcac.platform.rest.client.error.RestCompositeException: [Rest Composite Exception]: ( [Rest Error]: {Status code: 400}, {Error code: 20152} , {Error Source: null}, {Error Msg: Error while retrieving resources from provider [Infrastructure Service] for resource type [Machine].}, {System Msg: Error while retrieving resources from provider [{[email protected]}] for resource type [{com.vmware.csp.component.iaas.proxy.provider@resource.type.registration.name.Infrastructure.Machine}].} ) ( [Rest Error]: {Status code: 400}, {Error code: 42000} , {Error Source: null}, {Error Msg: Request was denied due to exceeded resource size limit. The maximum number of resources allowed is 100.}, {System Msg: Infrastructure service provider error: Request was denied due to exceeded resource size limit. The maximum number of resources allowed is 100

     
  • In the IaaS Web Server WAPI Elmah logs located at <Install drive>\Program Files (x86)\Vmware\vCAC\Web API\Logs\Elmah, you see entries similar to:

    Request was denied due to exceeded resource size limit. The maximum number of resources allowed is 100.
     
  • In the vRealize Automation logs located at /var/log/vmware/vcac/catalina.out file, you see the error:

    {"code":42000,"message":"Request was denied due to exceeded resource size limit. The maximum number of resources allowed is 100.","systemMessage":"Infrastructure service provider error: Request was denied due to exceeded resource size limit. The maximum number of resources allowed is 100.","moreInfoUrl":null}
     

Note: The preceding log excerpts are only examples. Date, time, and environmental variables may vary depending on your environment.


Cause

In vRealize Automation 7.2 there was a change introduced to address failures when a large number of machines are queried which disallows retrieval of more than 100 machines at a time.

Resolution

For out of the box content this issue is resolved in vRealize Automation 7.3 vRealize Orchestrator plugin, vRealize Automation 7.3 is available at VMware Downloads.
 
To resolve this issue for custom content and API calls you should adjust your API query or workflow to specify the paging information to overcome the limitation of 100 entries per call. The below gives examples on what the customization may look like depending on your use case and environment:
 
 
  • When using the REST API, specify the paging information by appending the following to the end of your API call:

    ?page=<page>&limit=<limit>


    For Example:

    When calling for catalogItems, this will look like:

    https://<vrva_url>/catalog-service/api/consumer/resources?page=1&limit=<some_number_less_than_100>


    For more information on the vRA REST API and its functionality please refer to the documentation's vRealize Automation 7.2 Developer Resources Guide .
     
  • When using a vRealize Orchestrator workflow, include host and pagination details for the vCAC plugin:
 
For example:
var myvCACCAFEOdataQuery = new vCACCAFEOdataQuery();
var myFilter = vCACCAFEFilterParam.substringOf("name" , "'" + nameFilter + "'");
myvCACCAFEOdataQuery.addFilter([myFilter]);
 
var myvCACCAFEPageOdataRequest = new vCACCAFEPageOdataRequest(page , pageLimit , myvCACCAFEOdataQuery);
 
var items = host.createCatalogClient().getCatalogConsumerCatalogItemService().getCatalogItems(myvCACCAFEPageOdataRequest);
System.log(items);


Additional Information

Note: Pagination is not supported in the inventory tree of vRO and pagination is not supported in find/find all methods in the vCAC plugin.vRO ワークフローまたは vRA の UI/API 呼び出しで 100 台を超えるマシンを取得できない
无法在 vRO 工作流或 vRA UI/API 调用中检索 100 多台计算机