Azure / azure-cli

Azure Command-Line Interface
MIT License
3.92k stars 2.89k forks source link

`az network application-gateway update`; Must specify either Capacity or AutoscaleConfiguration for the selected SKU tier WAF_v2 #28160

Open manikg321 opened 6 months ago

manikg321 commented 6 months ago

Describe the bug

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name az network application-gateway update

Errors:

 must specify either Capacity or AutoscaleConfiguration for the selected SKU tier WAF_v2

To Reproduce:

Expected Behavior

Modify application-gateway from 'Manual' to 'Autoscale', with minimum and maximum instances count.

Environment Summary

Not able to find flag 'AutoscaleConfiguration' to update existing application-gateway from 'Manual' to 'Autoscale' using az network application-gateway update

Windows-10-10.0.19045-SP0
Python 3.11.5
Installer: MSI

azure-cli 2.55.0 *

Extensions:
image-copy-extension 0.2.13

Dependencies:
msal 1.24.0b2
azure-mgmt-resource 23.1.0b2

Additional Context

Related command

az network application-gateway update

Errors

(ApplicationGatewayV2SkuMustSpecifyEitherCapacityOrAutoscaleConfiguration) Application Gateway aks-apgtw must specify either Capacity or AutoscaleConfiguration for the selected SKU tier WAF_v2 Code: ApplicationGatewayV2SkuMustSpecifyEitherCapacityOrAutoscaleConfiguration Message: Application Gateway aks-apgtw must specify either Capacity or AutoscaleConfiguration for the selected SKU tier WAF_v2

Issue script & Debug output

urllib3.connectionpool: https://management.azure.com:443 "PUT aks-apgtw?api-version=2023-02-01 HTTP/1.1" 400 450 cli.azure.cli.core.sdk.policies: Response status: 400 cli.azure.cli.core.sdk.policies: Response headers: cli.azure.cli.core.sdk.policies: 'Cache-Control': 'no-cache' cli.azure.cli.core.sdk.policies: 'Pragma': 'no-cache' cli.azure.cli.core.sdk.policies: 'Content-Length': '450' cli.azure.cli.core.sdk.policies: 'Content-Type': 'application/json; charset=utf-8' cli.azure.cli.core.sdk.policies: 'Expires': '-1' cli.azure.cli.core.sdk.policies: 'x-ms-request-id': 'xyz' cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': 'xyz' cli.azure.cli.core.sdk.policies: 'x-ms-arm-service-request-id': 'xyz' cli.azure.cli.core.sdk.policies: 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains' cli.azure.cli.core.sdk.policies: 'Server': 'Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0' cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-writes': '1199' cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'UKSOUTH:20240109T210418Z:xyz' cli.azure.cli.core.sdk.policies: 'X-Content-Type-Options': 'nosniff' cli.azure.cli.core.sdk.policies: 'Date': 'Tue, 09 Jan 2024 21:04:18 GMT' cli.azure.cli.core.sdk.policies: Response content: cli.azure.cli.core.sdk.policies: {"error":{"code":"ApplicationGatewayV2SkuMustSpecifyEitherCapacityOrAutoscaleConfiguration","message":"Application Gateway aks-apgtw must specify either Capacity or AutoscaleConfiguration for the selected SKU tier WAF_v2","details":[]}} cli.azure.cli.core.azclierror: Traceback (most recent call last): File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 663, in execute File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 726, in _run_jobs_serially File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 708, in _run_job File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 1013, in call File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 1000, in call File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_poller.py", line 108, in result File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/tracing/decorator.py", line 78, in wrapper_use_tracer File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_poller.py", line 130, in wait File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_poller.py", line 83, in _start File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure\cli\command_modules\network\aaz_compact\latest\network\application_gateway__cmds.py", line 8828, in _execute_operations File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure\cli\command_modules\network\aaz_compact\latest\network\application_gateway__cmds.py", line 8959, in call File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_operation.py", line 332, in on_error azure.core.exceptions.HttpResponseError: (ApplicationGatewayV2SkuMustSpecifyEitherCapacityOrAutoscaleConfiguration) Application Gateway aks-apgtw must specify either Capacity or AutoscaleConfiguration for the selected SKU tier WAF_v2 Code: ApplicationGatewayV2SkuMustSpecifyEitherCapacityOrAutoscaleConfiguration Message: Application Gateway aks-apgtw must specify either Capacity or AutoscaleConfiguration for the selected SKU tier WAF_v2

cli.azure.cli.core.azclierror: (ApplicationGatewayV2SkuMustSpecifyEitherCapacityOrAutoscaleConfiguration) Application Gateway aks-apgtw must specify either Capacity or AutoscaleConfiguration for the selected SKU tier WAF_v2 Code: ApplicationGatewayV2SkuMustSpecifyEitherCapacityOrAutoscaleConfiguration Message: Application Gateway aks-apgtw must specify either Capacity or AutoscaleConfiguration for the selected SKU tier WAF_v2 az_command_data_logger: (ApplicationGatewayV2SkuMustSpecifyEitherCapacityOrAutoscaleConfiguration) Application Gateway aks-apgtw must specify either Capacity or AutoscaleConfiguration for the selected SKU tier WAF_v2 Code: ApplicationGatewayV2SkuMustSpecifyEitherCapacityOrAutoscaleConfiguration Message: Application Gateway aks-apgtw must specify either Capacity or AutoscaleConfiguration for the selected SKU tier WAF_v2 cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x000001C6A759A0C0>] az_command_data_logger: exit code: 1 cli.main: Command ran in 6.084 seconds (init: 0.780, invoke: 5.303) telemetry.main: Begin splitting cli events and extra events, total events: 1 telemetry.client: Accumulated 0 events. Flush the clients. telemetry.main: Finish splitting cli events and extra events, cli events: 1 telemetry.save: Save telemetry record of length 4357 in cache telemetry.main: Begin creating telemetry upload process. telemetry.process: Creating upload process: "C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe C:\Program Files\Microsoft SDKs\Azure\CLI2\Lib\site-packages\azure\cli\telemetry__init__.pyc C:\Users\xyz.azure" telemetry.process: Return from creating process telemetry.main: Finish creating telemetry upload process.

Expected behavior

Modify application-gateway from 'Manual' to 'Autoscale', with minimum and maximum instances count.

Environment Summary

azure-cli 2.55.0 *

core 2.55.0 * telemetry 1.1.0

Extensions: image-copy-extension 0.2.13

Dependencies: msal 1.24.0b2 azure-mgmt-resource 23.1.0b2

Additional context

No response

azure-client-tools-bot-prd[bot] commented 6 months ago

Hi @manikg321,

2.55.0 is not the latest Azure CLI(2.56.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.

yonzhan commented 6 months ago

Thank you for opening this issue, we will look into it.

necusjz commented 6 months ago

it's an error code from server side, for service team awareness

microsoft-github-policy-service[bot] commented 6 months ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @aznetsuppgithub.

p9139010 commented 1 week ago

hi, still issue persist on Azure-Cli 2.61.0. when application gateway sku on Standard-V2 command line below doesn't change from Manual to AutoScale.

az network application-gateway update --name {} --resource-group {} --capacity {} --min-capacity {} --max-capacity {}