Azure / Azure/azure-rest-api-specs

Network (2020-05-01): Error removing/updating load balancer rules

Open
#10,104 23 comments 2 reactions 0 assignees View on GitHub
Network - Load Balancer Service Attention
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
2d 22h
Merged PRs (30d)
444

Description

When using 2020-05-01 network API, when I want to remove a load balancer rule that the load balancer is attached to VMSS, the request will fail.

The complete flow is as below:

GET https://management.azure.com/subscriptions/0-0-0-0/resourceGroups/test-hbtest/providers/Microsoft.Network/loadBalancers/hbtest1?api-version=2020-05-01 HTTP/2.0

{

"name": "hbtest1",
"id": "/subscriptions/0-0-0-0/resourceGroups/test-hbtest/providers/Microsoft.Network/loadBalancers/hbtest1",
"etag": "W/\"1867ac9a-5eca-431f-831c-939768a65794\"",
"type": "Microsoft.Network/loadBalancers",
"location": "eastus2",
"tags": {},
"properties": {
"provisioningState": "Succeeded",
"resourceGuid": "bf36d61a-728d-4255-8292-4397720a279d",
"frontendIPConfigurations": [
{
"name": "hbtest1",
"id": "/subscriptions/0-0-0-0/resourceGroups/test-hbtest/providers/Microsoft.Network/loadBalancers/hbtest1/frontendIPConfigurations/hbtest1",
"etag": "W/\"1867ac9a-5eca-431f-831c-939768a65794\"",
"type": "Microsoft.Network/loadBalancers/frontendIPConfigurations",
"properties": {
"provisioningState": "Succeeded",
"privateIPAddress": "10.0.1.4",
"privateIPAllocationMethod": "Dynamic",
"subnet": {
"id": "/subscriptions/0-0-0-0/resourceGroups/test-hbtest/providers/Microsoft.Network/virtualNetworks/acceptanceTestVirtualNetwork1/subnets/testsubnet"
},
"loadBalancingRules": [
{
"id": "/subscriptions/0-0-0-0/resourceGroups/test-hbtest/providers/Microsoft.Network/loadBalancers/hbtest1/loadBalancingRules/rule1"
}
],
"privateIPAddressVersion": "IPv4"
}
}
],
"backendAddressPools": [
{
"name": "hbtest1",
"id": "/subscriptions/0-0-0-0/resourceGroups/test-hbtest/providers/Microsoft.Network/loadBalancers/hbtest1/backendAddressPools/hbtest1",
"etag": "W/\"1867ac9a-5eca-431f-831c-939768a65794\"",
"properties": {
"provisioningState": "Succeeded",
"loadBalancerBackendAddresses": [
{
"name": "test-hbtest_hbtest1_virtualMachines_1_networkInterfaces_primaryprimary",
"id": "/subscriptions/0-0-0-0/resourceGroups/test-hbtest/providers/Microsoft.Network/loadBalancers/hbtest1/backendAddressPools/hbtest1/loadBalancerBackendAddresses/test-hbtest_hbtest1_virtualMachines_1_networkInterfaces_primaryprimary",
"etag": "W/\"1867ac9a-5eca-431f-831c-939768a65794\"",
"properties": {
"provisioningState": "Succeeded",
"networkInterfaceIPConfiguration": {
"id": "/subscriptions/0-0-0-0/resourceGroups/test-hbtest/providers/Microsoft.Compute/virtualMachineScaleSets/hbtest1/virtualMachines/1/networkInterfaces/primary/ipConfigurations/primary"
}
},
"type": "Microsoft.Network/loadBalancers/backendAddressPools/loadBalancerBackendAddresses"
},
{
"name": "test-hbtest_hbtest1_virtualMachines_2_networkInterfaces_primaryprimary",
"id": "/subscriptions/0-0-0-0/resourceGroups/test-hbtest/providers/Microsoft.Network/loadBalancers/hbtest1/backendAddressPools/hbtest1/loadBalancerBackendAddresses/test-hbtest_hbtest1_virtualMachines_2_networkInterfaces_primaryprimary",
"etag": "W/\"1867ac9a-5eca-431f-831c-939768a65794\"",
"properties": {
"provisioningState": "Succeeded",
"networkInterfaceIPConfiguration": {
"id": "/subscriptions/0-0-0-0/resourceGroups/test-hbtest/providers/Microsoft.Compute/virtualMachineScaleSets/hbtest1/virtualMachines/2/networkInterfaces/primary/ipConfigurations/primary"
}
},
"type": "Microsoft.Network/loadBalancers/backendAddressPools/loadBalancerBackendAddresses"
},
{
"name": "test-hbtest_hbtest1_virtualMachines_0_networkInterfaces_primaryprimary",
"id": "/subscriptions/0-0-0-0/resourceGroups/test-hbtest/providers/Microsoft.Network/loadBalancers/hbtest1/backendAddressPools/hbtest1/loadBalancerBackendAddresses/test-hbtest_hbtest1_virtualMachines_0_networkInterfaces_primaryprimary",
"etag": "W/\"1867ac9a-5eca-431f-831c-939768a65794\"",
"properties": {
"provisioningState": "Succeeded",
"networkInterfaceIPConfiguration": {
"id": "/subscriptions/0-0-0-0/resourceGroups/test-hbtest/providers/Microsoft.Compute/virtualMachineScaleSets/hbtest1/virtualMachines/0/networkInterfaces/primary/ipConfigurations/primary"
}
},
"type": "Microsoft.Network/loadBalancers/backendAddressPools/loadBalancerBackendAddresses"
}
],
"backendIPConfigurations": [
{
"id": "/subscriptions/0-0-0-0/resourceGroups/test-hbtest/providers/Microsoft.Compute/virtualMachineScaleSets/hbtest1/virtualMachines/1/networkInterfaces/primary/ipConfigurations/primary"
},
{
"id": "/subscriptions/0-0-0-0/resourceGroups/test-hbtest/providers/Microsoft.Compute/virtualMachineScaleSets/hbtest1/virtualMachines/2/networkInterfaces/primary/ipConfigurations/primary"
},
{
"id": "/subscriptions/0-0-0-0/resourceGroups/test-hbtest/providers/Microsoft.Compute/virtualMachineScaleSets/hbtest1/virtualMachines/0/networkInterfaces/primary/ipConfigurations/primary"
}
],
"loadBalancingRules": [
{
"id": "/subscriptions/0-0-0-0/resourceGroups/test-hbtest/providers/Microsoft.Network/loadBalancers/hbtest1/loadBalancingRules/rule1"
}
]
},
"type": "Microsoft.Network/loadBalancers/backendAddressPools"
}
],
"loadBalancingRules": [
{
"name": "rule1",
"id": "/subscriptions/0-0-0-0/resourceGroups/test-hbtest/providers/Microsoft.Network/loadBalancers/hbtest1/loadBalancingRules/rule1",
"etag": "W/\"1867ac9a-5eca-431f-831c-939768a65794\"",
"type": "Microsoft.Network/loadBalancers/loadBalancingRules",
"properties": {
"provisioningState": "Succeeded",
"frontendIPConfiguration": {
"id": "/subscriptions/0-0-0-0/resourceGroups/test-hbtest/providers/Microsoft.Network/loadBalancers/hbtest1/frontendIPConfigurations/hbtest1"
},
"frontendPort": 5000,
"backendPort": 5000,
"enableFloatingIP": false,
"idleTimeoutInMinutes": 10,
"protocol": "Tcp",
"enableDestinationServiceEndpoint": false,
"enableTcpReset": false,
"allowBackendPortConflict": false,
"loadDistribution": "Default",
"disableOutboundSnat": true,
"backendAddressPool": {
"id": "/subscriptions/0-0-0-0/resourceGroups/test-hbtest/providers/Microsoft.Network/loadBalancers/hbtest1/backendAddressPools/hbtest1"
},
"probe": {
"id": "/subscriptions/0-0-0-0/resourceGroups/test-hbtest/providers/Microsoft.Network/loadBalancers/hbtest1/probes/rule1"
}
}
}
],
"probes": [
{
"name": "rule1",
"id": "/subscriptions/0-0-0-0/resourceGroups/test-hbtest/providers/Microsoft.Network/loadBalancers/hbtest1/probes/rule1",
"etag": "W/\"1867ac9a-5eca-431f-831c-939768a65794\"",
"properties": {
"provisioningState": "Succeeded",
"protocol": "Tcp",
"port": 5000,
"intervalInSeconds": 15,
"numberOfProbes": 2,
"loadBalancingRules": [
{
"id": "/subscriptions/0-0-0-0/resourceGroups/test-hbtest/providers/Microsoft.Network/loadBalancers/hbtest1/loadBalancingRules/rule1"
}
]
},
"type": "Microsoft.Network/loadBalancers/probes"
}
],
"inboundNatRules": [],
"outboundRules": [],
"inboundNatPools": []
},
"sku": {
"name": "Standard"
}
}

PUT https://management.azure.com/subscriptions/0-0-0-0/resourceGroups/test-hbtest/providers/Microsoft.Network/loadBalancers/hbtest1?api-version=2020-05-01 HTTP/2.0

{

"id": "/subscriptions/0-0-0-0/resourceGroups/test-hbtest/providers/Microsoft.Network/loadBalancers/hbtest1",
"location": "eastus2",
"properties": {
"frontendIPConfigurations": [
{
"id": "/subscriptions/0-0-0-0/resourceGroups/test-hbtest/providers/Microsoft.Network/loadBalancers/hbtest1/frontendIPConfigurations/hbtest1",
"name": "hbtest1",
"properties": {
"loadBalancingRules": [
{
"id": "/subscriptions/0-0-0-0/resourceGroups/test-hbtest/providers/Microsoft.Network/loadBalancers/hbtest1/loadBalancingRules/rule1"
}
],
"privateIPAddress": "10.0.1.4",
"privateIPAllocationMethod": "Dynamic",
"privateIPAddressVersion": "IPv4",
"subnet": {
"id": "/subscriptions/0-0-0-0/resourceGroups/test-hbtest/providers/Microsoft.Network/virtualNetworks/acceptanceTestVirtualNetwork1/subnets/testsubnet"
},
"provisioningState": "Succeeded"
}
}
],
"backendAddressPools": [
{
"id": "/subscriptions/0-0-0-0/resourceGroups/test-hbtest/providers/Microsoft.Network/loadBalancers/hbtest1/backendAddressPools/hbtest1",
"name": "hbtest1",
"properties": {
"backendIPConfigurations": [
{
"id": "/subscriptions/0-0-0-0/resourceGroups/test-hbtest/providers/Microsoft.Compute/virtualMachineScaleSets/hbtest1/virtualMachines/1/networkInterfaces/primary/ipConfigurations/primary"
},
{
"id": "/subscriptions/0-0-0-0/resourceGroups/test-hbtest/providers/Microsoft.Compute/virtualMachineScaleSets/hbtest1/virtualMachines/2/networkInterfaces/primary/ipConfigurations/primary"
},
{
"id": "/subscriptions/0-0-0-0/resourceGroups/test-hbtest/providers/Microsoft.Compute/virtualMachineScaleSets/hbtest1/virtualMachines/0/networkInterfaces/primary/ipConfigurations/primary"
}
],
"loadBalancerBackendAddresses": [
{
"name": "test-hbtest_hbtest1_virtualMachines_1_networkInterfaces_primaryprimary",
"properties": {
"networkInterfaceIPConfiguration": {
"id": "/subscriptions/0-0-0-0/resourceGroups/test-hbtest/providers/Microsoft.Compute/virtualMachineScaleSets/hbtest1/virtualMachines/1/networkInterfaces/primary/ipConfigurations/primary"
}
}
},
{
"name": "test-hbtest_hbtest1_virtualMachines_2_networkInterfaces_primaryprimary",
"properties": {
"networkInterfaceIPConfiguration": {
"id": "/subscriptions/0-0-0-0/resourceGroups/test-hbtest/providers/Microsoft.Compute/virtualMachineScaleSets/hbtest1/virtualMachines/2/networkInterfaces/primary/ipConfigurations/primary"
}
}
},
{
"name": "test-hbtest_hbtest1_virtualMachines_0_networkInterfaces_primaryprimary",
"properties": {
"networkInterfaceIPConfiguration": {
"id": "/subscriptions/0-0-0-0/resourceGroups/test-hbtest/providers/Microsoft.Compute/virtualMachineScaleSets/hbtest1/virtualMachines/0/networkInterfaces/primary/ipConfigurations/primary"
}
}
}
],
"loadBalancingRules": [
{
"id": "/subscriptions/0-0-0-0/resourceGroups/test-hbtest/providers/Microsoft.Network/loadBalancers/hbtest1/loadBalancingRules/rule1"
}
],
"provisioningState": "Succeeded"
}
}
],
"loadBalancingRules": [],
"probes": [
{
"id": "/subscriptions/0-0-0-0/resourceGroups/test-hbtest/providers/Microsoft.Network/loadBalancers/hbtest1/probes/rule1",
"name": "rule1",
"properties": {
"loadBalancingRules": [
{
"id": "/subscriptions/0-0-0-0/resourceGroups/test-hbtest/providers/Microsoft.Network/loadBalancers/hbtest1/loadBalancingRules/rule1"
}
],
"protocol": "Tcp",
"port": 5000,
"intervalInSeconds": 15,
"numberOfProbes": 2,
"provisioningState": "Succeeded"
}
}
],
"inboundNatRules": [],
"inboundNatPools": [],
"outboundRules": [],
"resourceGuid": "bf36d61a-728d-4255-8292-4397720a279d",
"provisioningState": "Succeeded"
},
"sku": {
"name": "Standard"
},
"tags": {}
}

Response:

```json
{
"error": {
"code": "InvalidRequestFormat",
"details": [
{
"code": "DuplicateIpConfigurationReferenceOnBackendAddressPool",
"message": "Found duplicate ipConfiguration reference /subscriptions/0-0-0-0/resourceGroups/test-hbtest/providers/Microsoft.Network/networkInterfaces/|providers|Microsoft.Compute|virtualMachineScaleSets|hbtest1|virtualMachines|1|networkInterfaces|primary/ipConfigurations/primary on backend pool addresses /subscriptions//resourceGroups//providers/Microsoft.Network/loadBalancers//backendAddressPools//loadBalancerBackendAddresses/ and /subscriptions//resourceGroups//providers/Microsoft.Network/loadBalancers//backendAddressPools/hbtest1/loadBalancerBackendAddresses/70f3bd40-2344-4c29-8177-768d4c3ca926."
},
{
"code": "DuplicateIpConfigurationReferenceOnBackendAddressPool",
"message": "Found duplicate ipConfiguration reference /subscriptions/0-0-0-0/resourceGroups/test-hbtest/providers/Microsoft.Network/networkInterfaces/|providers|Microsoft.Compute|virtualMachineScaleSets|hbtest1|virtualMachines|2|networkInterfaces|primary/ipConfigurations/primary on backend pool addresses /subscriptions//resourceGroups//providers/Microsoft.Network/loadBalancers//backendAddressPools//loadBalancerBackendAddresses/ and /subscriptions//resourceGroups//providers/Microsoft.Network/loadBalancers//backendAddressPools/hbtest1/loadBalancerBackendAddresses/46147dc8-81bf-42be-8372-7815357a3f3f."
},
{
"code": "DuplicateIpConfigurationReferenceOnBackendAddressPool",
"message": "Found duplicate ipConfiguration reference /subscriptions/0-0-0-0/resourceGroups/test-hbtest/providers/Microsoft.Network/networkInterfaces/|providers|Microsoft.Compute|virtualMachineScaleSets|hbtest1|virtualMachines|0|networkInterfaces|primary/ipConfigurations/primary on backend pool addresses /subscriptions//resourceGroups//providers/Microsoft.Network/loadBalancers//backendAddressPools//loadBalancerBackendAddresses/ and /subscriptions//resourceGroups//providers/Microsoft.Network/loadBalancers//backendAddressPools/hbtest1/loadBalancerBackendAddresses/a34f230b-359e-42a3-bb2e-921085c852b8."
}
],
"message": "Cannot parse the request."
}
}
```

Contributor guide

Open the contributing guide

Research direction

The payload identifies the 2020-05-01 Network API and includes GET and PUT load balancer examples, but names no repository file, test, or entry point. Start by locating the specification for that API version and compare its load balancer rule model with the failing request. Done means the remove/update behavior is resolved and verified by the relevant specification tests.

Written by the indexing model from the issue text.

Assessment

Domain
api, backend-api-design, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.