az sql mi update not allowing "Gen8IM" and "Gen8IH" Hardware Family with "BusinessCritical" Service Tier
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
### Describe the bug
When executing az sql mi update having the combiantion of "BusinessCritical" service tier (--tier "BusinessCritical") and Gen8IH or Gen8IM Hardware Family (--family "Gen8IH"), cli throws exception.
cli.azure.cli.core.azclierror: (BCTargetEditionAndSpecifiedGPV2ParamNotAllowedInCreateUpdateOfMI) Combination of Business Critical target edition (sku.name/sku.tier parameters) with a specified isGeneralPurposeV2 parameter is not allowed in the create/update operation.
Code: BCTargetEditionAndSpecifiedGPV2ParamNotAllowedInCreateUpdateOfMI
Message: Combination of Business Critical target edition (sku.name/sku.tier parameters) with a specified isGeneralPurposeV2 parameter is not allowed in the create/update operation.
az_command_data_logger: (BCTargetEditionAndSpecifiedGPV2ParamNotAllowedInCreateUpdateOfMI) Combination of Business Critical target edition (sku.name/sku.tier parameters) with a specified isGeneralPurposeV2 parameter is not allowed in the create/update operation.
Code: BCTargetEditionAndSpecifiedGPV2ParamNotAllowedInCreateUpdateOfMI
Message: Combination of Business Critical target edition (sku.name/sku.tier parameters) with a specified isGeneralPurposeV2 parameter is not allowed in the create/update operation.
### Related command
az sql mi update
Example:
az sql mi update `
--name "azmp-01786-60a37" `
--resource-group "RG-6393-777-CPGDEV-XXXX" `
--subscription "AZ-PRO-IT-XXXXXXXXXX" `
--tier "BusinessCritical" `
--family "Gen8IH" `
--capacity "8" `
--storage "96" `
--database-format "SQLServer2022" `
--pricing-model "Regular" `
--debug
### Errors
azure.core.exceptions.HttpResponseError: (BCTargetEditionAndSpecifiedGPV2ParamNotAllowedInCreateUpdateOfMI) Combination of Business Critical target edition (sku.name/sku.tier parameters) with a specified isGeneralPurposeV2 parameter is not allowed in the create/update operation.
Code: BCTargetEditionAndSpecifiedGPV2ParamNotAllowedInCreateUpdateOfMI
Message: Combination of Business Critical target edition (sku.name/sku.tier parameters) with a specified isGeneralPurposeV2 parameter is not allowed in the create/update operation.
cli.azure.cli.core.azclierror: (BCTargetEditionAndSpecifiedGPV2ParamNotAllowedInCreateUpdateOfMI) Combination of Business Critical target edition (sku.name/sku.tier parameters) with a specified isGeneralPurposeV2 parameter is not allowed in the create/update operation.
Code: BCTargetEditionAndSpecifiedGPV2ParamNotAllowedInCreateUpdateOfMI
Message: Combination of Business Critical target edition (sku.name/sku.tier parameters) with a specified isGeneralPurposeV2 parameter is not allowed in the create/update operation.
az_command_data_logger: (BCTargetEditionAndSpecifiedGPV2ParamNotAllowedInCreateUpdateOfMI) Combination of Business Critical target edition (sku.name/sku.tier parameters) with a specified isGeneralPurposeV2 parameter is not allowed in the create/update operation.
Code: BCTargetEditionAndSpecifiedGPV2ParamNotAllowedInCreateUpdateOfMI
Message: Combination of Business Critical target edition (sku.name/sku.tier parameters) with a specified isGeneralPurposeV2 parameter is not allowed in the create/update operation.
cli.knack.cli: Event: Cli.PostExecute []
az_command_data_logger: exit code: 1
cli.__main__: Command ran in 7.931 seconds (init: 0.347, invoke: 7.584)
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 4257 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:\Temp\52f581a9-ecf0-446f-b212-d78c44405cbc"
telemetry.process: Return from creating process
telemetry.main: Finish creating telemetry upload process.
### Issue script & Debug output
cli.knack.cli: Command arguments: ['sql', 'mi', 'update', '--name', 'azmp-01786-60a37', '--resource-group', 'RG-6393-777-CPGDEV-XXXX', '--subscription', 'AZ-PRO-IT-XXXXXXXXXX', '--tier', 'BusinessCritical', '--family', 'Gen8IH', '--capacity', '8', '--storage', '96', '--database-format', 'SQLServer2022', '--pricing-model', 'Regular', '--debug']
....
cli.azure.cli.core.sdk.policies: 'Accept': 'application/json'
cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': 'd80307e3-192f-11ef-9bb4-48ad9a2e24f7'
cli.azure.cli.core.sdk.policies: 'CommandName': 'sql mi update'
cli.azure.cli.core.sdk.policies: 'ParameterSetName': '--name --resource-group --subscription --tier --family --capacity --storage --database-format --pricing-model --debug'
cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.59.0 (MSI) azsdk-python-core/1.28.0 Python/3.11.8 (Windows-10-10.0.22621-SP0)'
urllib3.connectionpool: https://management.azure.com:443 "GET /subscriptions/8fa3aaf6-678e-4e42-9576-XXXXXXXXXXXX/providers/Microsoft.Sql/locations/eastus/capabilities?include=supportedManagedInstanceVersions&api-version=2020-11-01-preview HTTP/1.1" 200 61353
cli.azure.cli.core.sdk.policies: Response status: 200
cli.azure.cli.core.sdk.policies: Response headers:
cli.azure.cli.core.sdk.policies: Response content:
cli.azure.cli.command_modules.sql.custom: _assert_capability_available: {'additional_properties': {}, 'name': 'East US', 'supported_server_versions': None, 'supported_managed_instance_versions': [], 'status': 'Available', 'reason': None}
cli.azure.cli.command_modules.sql.custom: _get_default_capability: []
cli.azure.cli.command_modules.sql.custom: _get_default_capability found default: {'additional_properties': {}, 'name': '12.0', 'supported_editions': [, , ], 'supported_instance_pool_editions': [], 'status': 'Default', 'reason': None}
cli.azure.cli.command_modules.sql.custom: _find_edition_capability: {'additional_properties': {}, 'name': None, 'tier': 'BusinessCritical', 'size': None, 'family': 'Gen8IH', 'capacity': 4}; [, , ]
cli.azure.cli.command_modules.sql.custom: _find_family_capability: {'additional_properties': {}, 'name': None, 'tier': 'BusinessCritical', 'size': None, 'family': 'Gen8IH', 'capacity': 4}; [, , ]
cli.azure.cli.command_modules.sql.custom: _find_managed_instance_sku_from_capabilities return: {'additional_properties': {}, 'name': 'BC_G8IH', 'tier': None, 'size': None, 'family': None, 'capacity': None}
cli.azure.cli.core.commands.client_factory: Getting management service client client_type=SqlManagementClient
urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
cli.azure.cli.core.auth.msal_authentication: ServicePrincipalCredential.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
msal.application: Cache hit an AT
msal.telemetry: Generate or reuse correlation_id: d8f9cb49-fc27-480c-a93c-6ef43d745f8d
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/8fa3aaf6-678e-4e42-9576-XXXXXXXXXXXX/resourceGroups/RG-6393-777-CPGDEV-XXXX/providers/Microsoft.Sql/managedInstances/azmp-01786-60a37?api-version=2023-05-01-preview'
cli.azure.cli.core.sdk.policies: Request method: 'PUT'
cli.azure.cli.core.sdk.policies: Request headers:
cli.azure.cli.core.sdk.policies: 'Content-Type': 'application/json'
cli.azure.cli.core.sdk.policies: 'Content-Length': '1645'
cli.azure.cli.core.sdk.policies: 'Accept': 'application/json'
cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': 'd80307e3-192f-11ef-9bb4-48ad9a2e24f7'
cli.azure.cli.core.sdk.policies: 'CommandName': 'sql mi update'
cli.azure.cli.core.sdk.policies: 'ParameterSetName': '--name --resource-group --subscription --tier --family --capacity --storage --database-format --pricing-model --debug'
cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.59.0 (MSI) azsdk-python-core/1.28.0 Python/3.11.8 (Windows-10-10.0.22621-SP0)'
cli.azure.cli.core.sdk.policies: 'Authorization': '*****'
cli.azure.cli.core.sdk.policies: Request body:
ucli.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': '269'
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': 'a120f50b-9c5e-43f9-bfed-e6c0e0d5be2b'
cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-writes': '1199'
cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': 'b98918cc-8538-4e26-8423-ccbe9fcd5aef'
cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'BRAZILSOUTH:20240523T181122Z:b98918cc-8538-4e26-8423-ccbe9fcd5aef'
cli.azure.cli.core.sdk.policies: 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
cli.azure.cli.core.sdk.policies: 'X-Content-Type-Options': 'nosniff'
cli.azure.cli.core.sdk.policies: 'X-Cache': 'CONFIG_NOCACHE'
cli.azure.cli.core.sdk.policies: 'X-MSEdge-Ref': 'Ref A: 14B0BB302A454D1C94D2B9EBAD49462B Ref B: RIO201060612045 Ref C: 2024-05-23T18:11:20Z'
cli.azure.cli.core.sdk.policies: 'Date': 'Thu, 23 May 2024 18:11:21 GMT'
cli.azure.cli.core.sdk.policies: Response content:
cli.azure.cli.core.sdk.policies: {"error":{"code":"BCTargetEditionAndSpecifiedGPV2ParamNotAllowedInCreateUpdateOfMI","message":"Combination of Business Critical target edition (sku.name/sku.tier parameters) with a specified isGeneralPurposeV2 parameter is not allowed in the create/update operation."}}
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 664, in execute
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 731, 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 701, in _run_job
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 334, in __call__
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 240, in handler
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 453, in cached_put
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 447, in _put_operation
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/tracing/decorator.py", line 76, in wrapper_use_tracer
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/mgmt/sql/operations/_managed_instances_operations.py", line 989, in begin_create_or_update
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/mgmt/sql/operations/_managed_instances_operations.py", line 855, in _create_or_update_initial
azure.core.exceptions.HttpResponseError: (BCTargetEditionAndSpecifiedGPV2ParamNotAllowedInCreateUpdateOfMI) Combination of Business Critical target edition (sku.name/sku.tier parameters) with a specified isGeneralPurposeV2 parameter is not allowed in the create/update operation.
Code: BCTargetEditionAndSpecifiedGPV2ParamNotAllowedInCreateUpdateOfMI
Message: Combination of Business Critical target edition (sku.name/sku.tier parameters) with a specified isGeneralPurposeV2 parameter is not allowed in the create/update operation.
cli.azure.cli.core.azclierror: (BCTargetEditionAndSpecifiedGPV2ParamNotAllowedInCreateUpdateOfMI) Combination of Business Critical target edition (sku.name/sku.tier parameters) with a specified isGeneralPurposeV2 parameter is not allowed in the create/update operation.
Code: BCTargetEditionAndSpecifiedGPV2ParamNotAllowedInCreateUpdateOfMI
Message: Combination of Business Critical target edition (sku.name/sku.tier parameters) with a specified isGeneralPurposeV2 parameter is not allowed in the create/update operation.
az_command_data_logger: (BCTargetEditionAndSpecifiedGPV2ParamNotAllowedInCreateUpdateOfMI) Combination of Business Critical target edition (sku.name/sku.tier parameters) with a specified isGeneralPurposeV2 parameter is not allowed in the create/update operation.
Code: BCTargetEditionAndSpecifiedGPV2ParamNotAllowedInCreateUpdateOfMI
Message: Combination of Business Critical target edition (sku.name/sku.tier parameters) with a specified isGeneralPurposeV2 parameter is not allowed in the create/update operation.
cli.knack.cli: Event: Cli.PostExecute []
az_command_data_logger: exit code: 1
cli.__main__: Command ran in 7.931 seconds (init: 0.347, invoke: 7.584)
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 4257 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:\Temp\52f581a9-ecf0-446f-b212-d78c44405cbc"
telemetry.process: Return from creating process
telemetry.main: Finish creating telemetry upload process.
### Expected behavior
Perform the Managed Instance Update.
### Environment Summary
"azure-cli": "2.59.0",
"azure-cli-core": "2.59.0",
"azure-cli-telemetry": "1.1.0",
"extensions": {}
### Additional context
Same happens with CLI 2.61.0
Issue is not present on CLI 2.56.0 (probably all releases after 2.56.0 are with the same issue).
If we use the Service Tier "GeneralPurpose", we can use "Gen8IM" and "Gen8IH" Hardware Family.
Issue is just present using "BusinessCritical".
Documentation on "https://learn.microsoft.com/en-us/cli/azure/sql/mi?view=azure-cli-latest#az-sql-mi-update" is outdated.
It informs "Gen4, Gen5" for --family.
Same output with "az sql mi update --help" where says "Gen4, Gen5".
While we can select on Azure Portal Gen5, Gen8IM, Gen8IH.
Contributor guide
Assessment
This issue has not been assessed yet.