Open jorgeakanieves opened 2 months ago
Hi @jorgeakanieves,
2.61.0 is not the latest Azure CLI(2.63.0).
If you haven't already attempted to do so, please upgrade to the latest Azure CLI version by following https://learn.microsoft.com/en-us/cli/azure/update-azure-cli.
Thank you for opening this issue, we will look into it.
Hey I am having the same issue. I can not add backend addresses to backend pool with syncMode is set automatic. I am using bicep for my deployments.
Thanks, Patti
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @aznetsuppgithub.
Describe the bug
When creating the backend pool setting the property 'sync-mode' to 'Automatic' and then adding an address to the pool is failing due of next error:
"Error: updating Backend Address Pool Address: (Address Name "<backend_pool_address_name>" / Backend Address Pool Name "<backend_pool_name>" / Load Balancer Name "<load_balancer_name>" / Resource Group "<resource_group_name>"): performing LoadBalancerBackendAddressPoolsCreateOrUpdate: unexpected status 400 (400 Bad Request) with error: ModificationOfBackendAddressesInPoolIsNotSupportedWhenSyncModeIsAutomatic: Modification of backend addresses in pools is not supported when sync mode is set as Automatic.
Related command
az network lb address-pool create--lb-name lbname -g rgname -n bpname--sync-mode "Automatic" --vnet "/subscriptions/<az_sub_id>/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/vnetname"
az network lb address-pool address add --ip-address "10.0.1.10" --lb-name lbname -g rgname --name bpaddress_name --pool-name bpname --virtual-network "/subscriptions/<az_sub_id>/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/vnetname"
Errors
Error: updating Backend Address Pool Address: (Address Name "<backend_pool_address_name>" / Backend Address Pool Name "<backend_pool_name>" / Load Balancer Name "<load_balancer_name>" / Resource Group "<resource_group_name>"): performing LoadBalancerBackendAddressPoolsCreateOrUpdate: unexpected status 400 (400 Bad Request) with error: ModificationOfBackendAddressesInPoolIsNotSupportedWhenSyncModeIsAutomatic: Modification of backend addresses in pools is not supported when sync mode is set as Automatic.
Issue script & Debug output
Expected behavior
Adding addresses to the backend pool that it´s previously created should work as it works when the backend pool sync_mode property is set to 'Manual'. It appears that addresses can´t be added when sync mode of the backend pool is set to 'Automatic' but there´s nothing about it in the limitations doc
https://learn.microsoft.com/en-us/azure/load-balancer/cross-subscription-overview#limitations
Environment Summary
azure-cli 2.61.0 *
core 2.61.0 * telemetry 1.1.0
Dependencies: msal 1.28.0 azure-mgmt-resource 23.1.1
Python (Windows) 3.11.8 (tags/v3.11.8:db85d51, Feb 6 2024, 21:52:07) [MSC v.1937 32 bit (Intel)]
Additional context
Also the alternative way creating the backend pool without sync_mode and adding the address to the pool so then changing the backend pool sync_mode property to 'Automatic' does not work:
(SyncModePropertyCannotBetSetWithLoadBalancerBackendAddressesPresent) Sync mode property of load balancer backend address pool cannot be set with backend addresses present in the pool. Code: SyncModePropertyCannotBetSetWithLoadBalancerBackendAddressesPresent Message: Sync mode property of load balancer backend address pool cannot be set with backend addresses present in the pool.