anyone had any issues with the azure-native provid...
# azure
m
anyone had any issues with the azure-native provider not waiting for vNet subnets to be created before moving on? Been seeing issues with later steps failing because the subnet doesn't exist, run it again a few mins later and it works, although if I run it too soon after I get this error:
autorest/azure: Service returned an error. Status=<nil> Code="AnotherOperationInProgress" Message="Another operation on this or dependent resource is in progress. To retrieve status of the operation use uri: <https://management.azure.com/subscriptions/892b688f-5e61-4b53-9091-e0ed72aef7a8/providers/Microsoft.Network/locations/westeurope/operations/6d9c24a9-c3f6-4e72-8193-bb618cc9b502?api-version=2020-11-01>." Details=[]
t
It would be nice if you could get the debug logs for this failure - I’d be able to reconstruct what’s going on with HTTP dumps in it
m
Ok, so looks like the origional error is actually the same as above, another operation in progress, which I believe is because I am trying to create 2 subnets, the second is trying to create whilst the first is still in progress, so either the first subnet is returning too early, or it's trying to run both in parallel. The subnets are created inside a foreach loop so I would expect them to create in serial
This is the error
error: autorest/azure: Service returned an error. Status=<nil> Code="AnotherOperationInProgress" Message="Another operation on this or dependent resource is in progress. To retrieve status of the operation use uri: <https://management.azure.com/subscriptions/892b688f-5e61-4b53-9091-e0ed72aef7a8/providers/Microsoft.Network/locations/westeurope/operations/8056aab9-8e85-4845-a8b2-069bca1f3240?api-version=2020-11-01>." Details=[]
t
The subnets are created inside a foreach loop so I would expect them to create in serial
For loop does not ensure serial execution. Your complete Pulumi program runs and then the provider deploys resources as soon as possible based on dependencies, not on the order in code.
Maybe we should retry those “AnotherOperationInProgress” errors? Or could that be wrong in some cases?
m
I think they would be worth retrying with a set timeout, as it usually means something else is working with the resource at that time. Any way to ensure it runs serially for these specific resources, can't really do a depends on given it is dynamically generating subnets
t
I guess you could build an array in the loop, add each subnet to it as you go, and pass it as depends on to the next one?
👍 1
m
Doing that seems to have sorted it, but I think it would be a good idea to retry that error
t
Could you open an issue for that? Ideally, attach a repro of your use case. Thank you!
m
Will do