Skip to main content

We've Moved!

Product Documentation has moved to docs.hitachivantara.com
Hitachi Vantara Knowledge

Implementing retry processing

This section describes points to consider when you implement retry processing in scripts that use the REST API.

Implementing retry processing

When you use the REST API to create a client program, implement the retry processing properly so that the program is executed as intended. After executing the retry processing, we recommend that you verify the client program in a system configuration similar to the production environment.
Retry conditions

Sometimes a REST API request cannot be executed, because for example, the network or server is temporarily busy or resources of the storage system are locked. In such cases, you might be able to resume processing of the request by implementing processing to retry failed requests. To determine whether an error can be handled by retrying the request, check the response information, such as HTTP status codes and error codes. The following describes the conditions under which errors can be handled by retrying the failed request.

A request can be retried when one of the following conditions is met:

  • The returned HTTP status code is 503 (Service unavailable).
  • When a job cannot be executed, RETRY is returned for solutionType of the error object.
  • When REST API is used for a long period, the following response is returned (VSP E series, VSP G350, G370, G700, G900, VSP F350, F370, F700, F900).

    1. The HTTP status code is 500, and a response body is returned in HTML format for a several minutes.
    2. When executing the API except discarding the sessions API, a blank response body is returned with the status code 200.

      After that, the symptom described in 1. occurs.

    In this case, execute the API again until an HTML format response is not returned with the status code 500.

  • A specific message ID or an error code of the storage system is returned to the error object.

    Whether the error can be handled by retrying the request depends on the error object. You can get the error object from either of the following:

    • Response returned when the API request is issued
    • Response from the API request that gets job information

    Error object

    Message ID

    Error codes from the storage system

    SSB1

    SSB2

    errorCode

    Response returned when the API request is issued

    KART00003-E

    KART00006-E

    KART30003-E

    KART30090-E

    KART30095-E

    KART30096-E

    KART30097-E

    KART40042-E

    KART40049-E

    KART40051-E

    KART40052-E

    --

    --

    --

    Response from the API request that gets job information

    KART30000-E

    2E11

    2205

    --

    KART30008-E

    KART30072-E

    --

    --

    --

    (Legend)

    --: Not applicable

  • When the API request is for locking a resource group, a specific message ID or error code is returned to the error object.

    The following table describes the retry conditions for the API request that locks a resource group.

    Error object

    Message ID

    Error codes from the storage system

    SSB1

    SSB2

    errorCode

    Response returned when the API request is issued

    --

    --

    --

    --

    Response from the API request that gets job information

    KART40050-E

    KART40052-E

    --

    --

    --

    KART30000-E

    --

    --

    EX_EACCES

    (Legend)

    --: Not applicable

Verifying client programs

Verify client programs in a system configuration similar to the production environment.

Verify them from the following viewpoints:

  • Whether client programs in which retry conditions are implemented are executable
  • Whether client programs end within the expected execution time

If the verification result is not as expected, check and, if necessary, revise the programs from the following viewpoints:

  • Adjust the retry count and retry time of clients' API requests.
  • Reduce the number of API requests to be executed at the same time, and reduce the retry frequency of clients' API requests.

    You need to pay attention to the maximum number of concurrent executions for the following API requests. See the estimated maximum number.

    For VSP 5000 series:

    API requests for which the number of concurrent executions is limited

    Maximum number of requests that can be executed at the same time

    API request for getting a list of resource groups

    2

    API request for getting global-active device pair information

    2

    For VSP E series, VSP G350, G370, G700, G900 or VSP F350, F370, F700, F900:

    API requests for which the number of concurrent executions is limited

    Maximum number of requests that can be executed at the same time

    API request for getting a list of resource groups

    2

    API request for getting volume information (the number of volumes to be obtained: 2,049 or more)

    2

    API request for getting port information (when executed with detailInfoType=logins specified in the query)

    2 (number of ports: 8)

    1 (number of ports: 40)

    API request for getting port information (when run with detailInfoType=loginHostNqn specified in the query and portId not specified, on VSP E1090 or VSP E1090H)

    11 (number of Fibre Channel ports: 8)

    3 (number of Fibre Channel ports: 40)

    API request for getting information about host groups or iSCSI targets (when executed without specifying portId as a query parameter)

    13 (number of ports: 32)

    6 (number of ports: 80)

    API request for getting global-active device pair information

    2

    API request for getting information about virtual LDEVs (the number of virtual LDEVs to be obtained is 2,049 or more)

    2