【发布时间】:2019-10-15 03:55:02
【问题描述】:
我参加了一个项目,该项目通过模板进行了 ARM 部署,运行了几个月,直到最近一切正常:
但随后,某些东西发生了变化,大多数(但不是全部)部署开始失败:
报错是:
{
"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."
}
然而,这是当时唯一运行的部署。现在我已经设法通过在流量管理器资源中添加dependsOn 来避免这个问题:
{
"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'))]"
]
}
但我担心这样做可能只是混淆了一个仍然需要解决的真正问题。如果有人知道更多关于这个错误的信息,或者它为什么突然开始发生,我很想知道!
【问题讨论】:
标签: azure-resource-manager azure-deployment azure-template