DimensionDataResearch / terraform-provider-ddcloud

Terraform provider for Dimension Data cloud compute.
MIT License
16 stars 13 forks source link

Create async operation lock #61

Closed tintoy closed 7 years ago

tintoy commented 7 years ago

It seems that CloudControl frequently returns UNEXPECTED_ERROR when 2 asynchronous operations (such as create network domain or deploy VLAN) are initiated simultaneously.

Let's create an asynchronous operation lock that ensures only one asynchronous operation is initiated at a time.

mingsheng36 commented 7 years ago

Great! But dont know why they're calling it async when it is actually acting more like sync?

tintoy commented 7 years ago

Call to deploy returns immediately. You have to keep getting the deployed entity's state until it says the work is complete. So initial call is synchronous but overall the operation is asynchronous.

tintoy commented 7 years ago

Now that this has been implemented, we no longer see UNEXPECTED_ERROR from the API.

Now we just have to deal with RESOURCE_BUSY, which is tracked by #11.