Skip to content

When fire several blueprints at once VCD responds with "duplicate name (400) error" #42

@bostko

Description

@bostko

Environment

  • Vcloud Director 1.5
  • Latest jclouds 1.9.x
  • standard admin account (I am not aware for the exect limit for OPERATION_LIMITS_EXCEEDED protection)

Steps to reproduce
Launch it in Apache Brooklyn with jclouds-vcloud-director and fire where 10 blueprints are deployed simultaneously.

Observed behaviour
Digging out debug logs it appeared that when those 10 provisioning were triggered the last ~5 of them were failing on POST /vdc/{id}/action/composeVApp with OPERATION_LIMITS_EXCEEDED

Inspecting the log showed that between sending composeVapp request and receiving a response 3 or 4 check task status requests happened (GET /task/{taskId})
After a response from GET task a response is returned from composeVapp which says:

<Error xmlns="http://www.vmware.com/vcloud/v1.5" minorErrorCode="OPERATION_LIMITS_EXCEEDED" message="[ {{requestId}} ] The maximum number of simultaneous operations for user &quot;{{User}}&quot; on organization &quot;{{Organization}}&quot; has been reached." majorErrorCode="400" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5

If I check VCloud Director web console I see that vApps are leftover in pending state from the failed composeVapp request.
They are left for ever in pending (not created nor started stage) and I assume no resources or vms are allocated)

Because of retry logic for such responses implemented previously in #41
jclouds-vcloud-director issues a second composeVapp request and then it fails with vApp duplication name.

Expected behavior
VCloud Director is not expected to return half done operations. Most business applications out there take care to fully abort unsuccessful operations.

Possible Workarounds that could be implemented in jclouds-vcloud-director

  • reduce polling status requests.
  • implement a locking mechanism and reduce or block jclouds-vcloud-director from making requests before or after composeVapp is issued
  • exclude composeVapp from retry logic in BaseHttpCommandExecutorService<Request> and implement a custom retry logic which also takes care for orphaned vApps which may be created with the initial vApp name.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions