2016-11-22 4 views
0

Я пытаюсь изменить шаблон ARM, который у меня есть, который развертывает некоторые виртуальные машины и определяет некоторые правила автомасштабирования (вы можете увидеть полный шаблон в https://gist.github.com/jinky32/d80e0ab2137236ff262484193f93c946, он основан на шаблоне в https://github.com/gbowerman/azure-myriad/tree/master/vmss-ubuntu-scale).Azure - задание правил балансировки нагрузки в шаблоне ARM

Я пытаюсь добавить некоторые правила балансировки нагрузки, чтобы трафик распространялся по новым виртуальным машинам, поскольку они генерируются в ответ на определенные правила автомасштабирования.

Когда я запускаю этот шаблон через Azure CLI, я не получаю ошибок в терминале, но развертывание не выполняется. Порывшись в событие ошибок я вижу два:

statusCode:BadRequest serviceRequestId:ef42ec66-600e-4fb9-b4e2-dc2c06dda79c statusMessage:{"error":{"code":"InvalidRequestFormat","message":"Cannot parse the request.","details":[{"code":"InvalidJsonReferenceFormat","message":"Reference Id cc2bepool is not formatted correctly. The Id is expected to reference resources of type loadBalancers/backendAddressPools. Path properties.loadBalancingRules[0].properties.backendAddressPool."}]}} responseBody:{"error":{"code":"InvalidRequestFormat","message":"Cannot parse the request.","details":[{"code":"InvalidJsonReferenceFormat","message":"Reference Id cc2bepool is not formatted correctly. The Id is expected to reference resources of type loadBalancers/backendAddressPools. Path properties.loadBalancingRules[0].properties.backendAddressPool."}]}}

и

statusCode:BadRequest statusMessage:{"error":{"code":"InvalidRequestFormat","message":"Cannot parse the request.","details":[{"code":"InvalidJsonReferenceFormat","message":"Reference Id cc2bepool is not formatted correctly. The Id is expected to reference resources of type loadBalancers/backendAddressPools. Path properties.loadBalancingRules[0].properties.backendAddressPool."}]}}

Я положил некоторые из соответствующих переменных ниже, и также включили мой объект loadbalancer, но я считаю, что вопрос связан с тем, как я ссылаюсь на backendAddressPool:

"loadBalancingRules": [ 
     { 
     "name": "LBRule", 
     "properties": { 
      "frontendIPConfiguration": { 
      "id": "[variables('frontEndIPConfigID')]" 
      }, 
      "backendAddressPool": { 
      "id": "[variables('bePoolName')]" 
      }, 

но я в замешательстве потому что я отношусь к нему так же в другом месте. Любые советы о том, как это сделать, очень ценятся.

"variables": { 
.... 
"loadBalancerName": "[concat(parameters('vmssName'), 'lb')]", 
"lbProbeID": "[concat(variables('lbID'),'/probes/tcpProbe')]", 
"publicIPAddressID": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]", 
"lbID": "[resourceId('Microsoft.Network/loadBalancers',variables('loadBalancerName'))]", 
"natPoolName": "[concat(parameters('vmssName'), 'natpool')]", 
"bePoolName": "[concat(parameters('vmssName'), 'bepool')]", 
.... 
.... 
} 
..... 
..... 
{ 
    "type": "Microsoft.Network/loadBalancers", 
    "name": "[variables('loadBalancerName')]", 
    "location": "[variables('location')]", 
    "apiVersion": "[variables('networkApiVersion')]", 
    "dependsOn": [ 
    "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]" 
    ], 
    "properties": { 
    "frontendIPConfigurations": [ 
     .... 
    ], 
    "backendAddressPools": [ 
     { 
     "name": "[variables('bePoolName')]" 
     } 
    ], 
    "inboundNatPools": [ 
     { 
     "name": "[variables('natPoolName')]", 
     ... 
     }, 
     { 
     "name": "natpooltileserver", 
     .... 
     }, 
     { 
     "name": "natpool2", 
     .... 
    ], 
      "loadBalancingRules": [ 
     { 
     "name": "LBRule", 
     "properties": { 
      "frontendIPConfiguration": { 
      "id": "[variables('frontEndIPConfigID')]" 
      }, 
      "backendAddressPool": { 
      "id": "[variables('bePoolName')]" 
      }, 
      "protocol": "tcp", 
      "frontendPort": 80, 
      "backendPort": 80, 
      "enableFloatingIP": false, 
      "idleTimeoutInMinutes": 5, 
      "probe": { 
      "id": "[variables('lbProbeID')]" 
      } 
     } 
     } 
    ], 
    "probes": [ 
     { 
     "name": "tcpProbe", 
     "properties": { 
      "protocol": "tcp", 
      "port": 80, 
      "intervalInSeconds": 5, 
      "numberOfProbes": 2 
     } 
     } 
    ] 
    } 
}, 

ответ

0

перейдите на портал и откройте запрос поддержки, чтобы узнать, что не так с вашими изменениями в шаблоне.