0

I have come onto a project that has had an ARM deployment via templates running for a number of months now, and until recently everything was working without issue:

Successful deployments

But then, something changed and most (but not all) deployments began failing:

Unsuccessful deployments

The error reported is:

{  
 "code": "Conflict",
 "message": "Conflicting changes were detected when processing the request. This can happen when there are multiple requests trying to update one profile at the same time. Please retry your request."
}

Yet this is the only deploy running at the time. For now I've managed to stave off the issue by adding a dependsOn to the traffic manager resource:

{
  "apiVersion": "2015-11-01",
  "type": "Microsoft.Network/trafficManagerProfiles",
  "name": "[variables('traffic-manager-name')]",
  "location": "global",
  "properties": {
    "profileStatus": "Enabled",
    "trafficRoutingMethod": "Priority",
    "dnsConfig": {
      "relativeName": "[variables('traffic-manager-name')]",
      "ttl": 30
    },
    "monitorConfig": {
      "protocol": "HTTP",
      "port": 80,
      "path": "/"
    },
    "endpoints": [
      {
        "name": "[variables('traffic-manager-endpoint')]",
        "type": "Microsoft.Network/trafficManagerProfiles/azureEndpoints",
        "properties": {
          "endpointStatus": "Enabled",
          "targetResourceId": "[resourceId('Microsoft.Web/sites', variables('web-app-name'))]",
          "target": "[concat(variables('web-app-name'), '.azurewebsites.net')]",
          "weight": 1,
          "priority": 1,
          "endpointLocation": "[resourceGroup().location]"
        }
      }
    ]
  },
  "dependsOn": [
    "[resourceId('Microsoft.Web/Sites', variables('web-app-name'))]"
  ]
}

But I am concerned that doing so may simply be obfuscating a genuine issue that still needs addressing. If anyone knows any more about that error, or why it might have just started happening out of nowhere, I'd love to know!

Selurs
  • 11
  • 3

1 Answers1

0

When using ARM template to deploy traffic manager, it returns with 409 conflict error "Conflicting changes were detected when processing the request. This can happen when there are multiple requests trying to update one profile at the same time. Please retry your request." because the ARM template deployments are aimed at creating new resources hence it use PUT requests. If the traffic manager profile already exists, it will return when the template makes a change that would alter or affect existing profiles. Before deployment, there was a traffic manager created, thus the template failed with conflict error. To resolve or overcome the issue make sure that no TM profile created before the ARM deployment. Then retest the deployment.

Hope this helps! Cheers!

KrishnaG
  • 3,340
  • 2
  • 6
  • 16
  • Thanks for the suggestion, however the traffic manager has been around for months, and the deployments were "overwriting" it without issue. I'm trying to figure out why, all of a sudden, this *stopped* working, and we started getting the conflict. – Selurs Oct 25 '19 at 06:21