create CDN met error: conflict
when calling cdn module to create a CDN profile, met error: conflict. The error is only reproduced in one of our test environment, but not others. We tracked down the x-ms-client-request-id for furthur investigation.
'x-ms-client-request-id': 'ac5feae4-a4f9-11e8-853b-000d3afd55c9'
azure-mgmt-cdn versoin: 3.0.0
error detail
The full traceback is:
2018-08-20 07:16:46 File "/tmp/ansible_azure_rm_cdnprofile_payload_axkmi9mq/__main__.py", line 229, in create_cdnprofile
2018-08-20 07:16:46 poller = self.cdn_management_client.profiles.create(self.resource_group, self.name, parameters)
2018-08-20 07:16:46 File "/usr/local/lib/python3.6/dist-packages/azure/mgmt/cdn/operations/profiles_operations.py", line 322, in create
2018-08-20 07:16:46 **operation_config
2018-08-20 07:16:46 File "/usr/local/lib/python3.6/dist-packages/azure/mgmt/cdn/operations/profiles_operations.py", line 272, in _create_initial
2018-08-20 07:16:46 raise models.ErrorResponseException(self._deserialize, response)
2018-08-20 07:16:46
2018-08-20 07:16:46 "msg": "Error creating Azure CDN profile instance: Operation returned an invalid status code 'Conflict'"
parameters = Profile(
location=self.location,
sku=Sku(name=self.sku),
tags=self.tags
)
try:
poller = self.cdn_management_client.profiles.create(self.resource_group, self.name, parameters)
response = self.get_poller_result(poller)
return cdnprofile_to_dict(response)
except ErrorResponseException as exc:
Hi @prakharsharma10, @nachakra Do you know what circumstances would result in this 'Conflict' error?
When you say test environment, is this testing against prod or dogfood ARM? One reason for conflict could be that somehow 2 profiles were being created with the same name under the same subscription/Resource Group. I don't know if that's a possibility for these tests.
@nachakra I'm saying testing against a test only environment, and we've checked there's no profiles at all in the subscription before do creating. and same tests could pass on another environment/subscription.
closed since we've got service team's help figured out root cause
Same issue, any solution? Also using a test subscription. Thanks
my issue is resolved by: register CDN as a resource provider in subscription. https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-supported-services#portal