azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

Latest API version not available in sovereign clouds

Open jiasli opened this issue 2 years ago • 12 comments

Previously reported by

  • Microsoft.Cdn: #16094
  • Microsoft.Storage: #18828, #17189
  • Microsoft.ManagedIdentity: #22661
  • Microsoft.KeyVault: #20226, #23888

Symptom

We have a centralized location to define API versions for each resource provider:

https://github.com/Azure/azure-cli/blob/daa568579dbaec5af1ac92d261014cf9ce3ff9b1/src/azure-cli-core/azure/cli/core/profiles/_shared.py#L154-L158

Azure CLI supports 4 clouds, including 3 sovereign clouds:

  • AzureCloud
  • AzureChinaCloud
  • AzureUSGovernment
  • AzureGermanCloud

All of them use the same latest profile and the same API version for each resource provider.

However, it happens frequently that a new API version is only deployed to AzureCloud, but not other clouds. Using Azure CLI to call that API version leads to error like:

NoRegisteredProviderFound - No registered resource provider found for location 'chinanorth' and API version '2019-06-15-preview' for type 'profiles/endpoints'. The supported api-versions are '2015-06-01, 2016-04-02, 2016-10-02, 2017-04-02, 2017-10-12, 2018-04-02, 2019-04-15'. The supported locations are 'chinanorth, chinanorth2, chinaeast, chinaeast2'.

Temporary workaroud

Install previous versions of Azure CLI that use old API versions in sovereign clouds. The installation document has detailed instruction on how to install previous versions: https://learn.microsoft.com/en-us/cli/azure/install-azure-cli

Solution

Service team should deploy the new API version to all clouds synchronously.

jiasli avatar Sep 23 '22 03:09 jiasli

A similar issue is when a new API version is only deployed to certain regions, but not other regions. This happened for network RP before:

  • https://github.com/Azure/azure-cli/issues/13827

jiasli avatar Sep 23 '22 04:09 jiasli

Azure PowerShell faces the same issue:

  • https://github.com/Azure/azure-powershell/issues/14395

jiasli avatar Sep 23 '22 04:09 jiasli

Hi this happened again in our pipeline, could some actions be taken to ensure API version consistencies in sovereign clouds?

08:53:58  fatal: [127.0.0.1]: FAILED! => {"attempts": 3, "changed": true, "cmd": "az keyvault update  --resource-group \"modelt-tcyz0otvcne\"  --name \"modelt-tcyz0otvcne-vault\"  --default-action Deny\n", "delta": "0:00:02.765346", "end": "2023-04-06 00:53:56.239069", "msg": "non-zero return code", "rc": 1, "start": "2023-04-06 00:53:53.473723", "stderr": "ERROR: (NoRegisteredProviderFound) No registered resource provider found for location 'chinanorth3' and API version '2023-02-01' for type 'vaults'. The supported api-versions are '2015-06-01, 2016-10-01, 2018-02-14-preview, 2018-02-14, 2019-09-01, 2021-04-01-preview, 2021-06-01-preview, 2021-10-01, 2021-11-01-preview, 2022-07-01, 2022-11-01, 2022-02-01'. The supported locations are 'chinanorth, chinaeast, chinanorth2, chinaeast2, chinanorth3, chinaeast3'.\nCode: NoRegisteredProviderFound\nMessage: No registered resource provider found for location 'chinanorth3' and API version '2023-02-01' for type 'vaults'. 

jonathanzhang02 avatar Apr 07 '23 02:04 jonathanzhang02

Previously reported by

Symptom

We have a centralized location to define API versions for each resource provider:

https://github.com/Azure/azure-cli/blob/daa568579dbaec5af1ac92d261014cf9ce3ff9b1/src/azure-cli-core/azure/cli/core/profiles/_shared.py#L154-L158

Azure CLI supports 4 clouds, including 3 sovereign clouds:

  • AzureCloud
  • AzureChinaCloud
  • AzureUSGovernment
  • AzureGermanCloud

All of them use the same latest profile and the same API version for each resource provider.

However, it happens frequently that a new API version is only deployed to AzureCloud, but not other clouds. Using Azure CLI to call that API version leads to error like:

NoRegisteredProviderFound - No registered resource provider found for location 'chinanorth' and API version '2019-06-15-preview' for type 'profiles/endpoints'. The supported api-versions are '2015-06-01, 2016-04-02, 2016-10-02, 2017-04-02, 2017-10-12, 2018-04-02, 2019-04-15'. The supported locations are 'chinanorth, chinanorth2, chinaeast, chinaeast2'.

Temporary workaroud

Install previous versions of Azure CLI that use old API versions in sovereign clouds. The installation document has detailed instruction on how to install previous versions: https://learn.microsoft.com/en-us/cli/azure/install-azure-cli

Solution

Service team should deploy the new API version to all clouds synchronously.

Hello,

I am using Azure Portal -> cloud shell, could you suggest how to work around this issue?

fangchen0601 avatar Jul 10 '23 12:07 fangchen0601

Unlike the issue title suggests this issue is not just affecting sovereign clouds, but also the Azure public cloud. See https://github.com/Azure/azure-cli/issues/26813 and https://github.com/Azure/azure-cli/issues/26814

PSanetra avatar Jul 10 '23 13:07 PSanetra

I find it confusing that the bot would link an issue to another issue which is opened relating to sovereign cloud, when the issue I opened earlier is NOT related to sovereign cloud. Either change the title, or stop linking the issues.

iamalexmang avatar Aug 11 '23 10:08 iamalexmang

Looking forward to a resolution for this issue that is still occurring.

ERROR: (NoRegisteredProviderFound) No registered resource provider found for location 'chinanorth3' and API version '2023-10-02-preview' for type 'managedClusters'. The supported api-versions are '2017-08-31, 2018-03-31, 2019-02-01, 2019-04-01, 2019-06-01, 2019-08-01, 2019-10-01, 2019-11-01, 2020-01-01, 2020-02-01, 2020-03-01, 2020-04-01, 2020-06-01, 2020-07-01, 2020-09-01, 2020-11-01, 2020-12-01, 2021-02-01, 2021-03-01, 2021-05-01, 2021-07-01, 2021-08-01, 2021-09-01, 2021-10-01, 2022-01-01, 2022-01-02-preview, 2022-02-01, 2022-03-01, 2022-03-02-preview, 2022-04-01, 2022-04-02-preview, 2022-05-02-preview, 2022-06-01, 2022-06-02-preview, 2022-07-01, 2022-07-02-preview, 2022-08-01, 2022-08-02-preview, 2022-08-03-preview, 2022-09-01, 2022-09-02-preview, 2022-10-02-preview, 2022-11-01, 2022-11-02-preview, 2023-01-01, 2023-01-02-preview, 2023-02-01, 2023-02-02-preview, 2023-03-01, 2023-03-02-preview, 2023-04-01, 2023-04-02-preview, 2023-05-01, 2023-05-02-preview, 2023-06-01, 2023-06-02-preview, 2023-07-01, 2023-07-02-preview, 2023-08-01, 2023-08-02-preview, 2023-09-01, 2023-09-02-preview'. The supported locations are 'chinaeast2, chinanorth2, chinanorth3'.

Using older versions of the az CLI did not resolve the issue, but using an older version of the extension did. az extension list-versions --name aks-preview helped to find the previous version to install with az extension add --name aks-preview --version $AZURE_CLI_AKS_PREVIEW_EXTENSION_VERSION

hobti01 avatar Nov 28 '23 13:11 hobti01

We have an internal ticket IcM 446898172 for this error:

No registered resource provider found for location 'xxx' and API version '2023-10-02-preview' for type 'managedClusters'.

jiasli avatar Dec 06 '23 09:12 jiasli

Hi team, what is the progress on this issue?

yunbozhang-msft avatar Jan 15 '24 05:01 yunbozhang-msft

Still running into this issue.

michaelschuett-tomtom avatar Mar 26 '24 16:03 michaelschuett-tomtom

I'm using Azure Dev Ops and facing this issue, how to fix in ADO?

IakimLynnyk-TomTom avatar Apr 29 '24 10:04 IakimLynnyk-TomTom