pulumi-azure-native: Retry "AnotherOperationInProgress" error messages

Affected feature

Currently if Azure generates a “AnotherOperationInProgress” error Pulumi will fail. This error is often caused by trying to access two sub-resources on a resource at the same time. A good example is creating multiple subnets on a virtual network. Pulumi will try and create them all that the same time, but Azure can only create them one at a time.

Adding a back-off and retry for the “AnotherOperationInProgress” error message would help workaround this problem

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 7
  • Comments: 16 (5 by maintainers)

Commits related to this issue

Most upvoted comments

Hello Team, We are having exactly the same problem and we have to remove our factorization in order to chain the creation of the subnets in same vNet by the code 😕

Hi all, a quick update on this issue. One of the factors blocking this being fixed was that we were using an older core library from Microsoft which didn’t allow customising retry behaviour as needed. We’ve got work underway to replace this core transport library (and auth stack) which allows us access to extending the default retry behaviour.

This should be addressed with the changes in:

However, it will initially be hidden behind a feature flag while we take some extra time to verify the new stack has no significant behaviour changes. To access this improved behaviour once #3653 is released but before the new stack is enabled by default you’ll be able to set the environment variable PULUMI_ENABLE_AZCORE_BACKEND=true.

Hi team, are there any plans to fix this? Terraform also had the same kind of race condition, but they already fixed that a while back.

Does it create a havox delete basically on all resources that have an assignment in any of the subnets?

I think the answer is yes, unfortunately. In that case you’d have to remove all the dependsOn annotations and run an update before trying to rename the first subnet. I realise it’s not ideal and we should solve the original problem.

Hi everyone. This is now available in 2.69.0 of the provider when using the environment variable PULUMI_ENABLE_AZCORE_BACKEND=true. We’ve tested this against subnet creation but would love some additional validation that this is working well for other resources too. Thanks!

@infin8x thanks, I have done that and it does indeed work around the issue.