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

No registered resource provider found for location

Open carbolymer opened this issue 7 years ago • 3 comments

Command Name az acr show

Errors:

No registered resource provider found for location 'westeurope' and API version '2019-05-01' for type 'registries'. The supported api-versions are '2016-06-27-preview, 2017-03-01, 2017-10-01, 2017-06-01-preview'. The supported locations are 'westus, eastus, southcentralus, westeurope, northeurope, uksouth, ukwest, australiaeast, australiasoutheast, centralindia, koreacentral, francecentral, southafricanorth, eastasia, japaneast, japanwest, southeastasia, southindia, brazilsouth, canadaeast, canadacentral, centralus, eastus2, northcentralus, westcentralus, westus2'.

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • create azure container registry myacr in resource group myresourcegroup (e.g. through azure portal)
  • az acr show --name myacr --resource-group myresourcegroup --query "id" --output tsv

Expected Behavior

It returns the ID of the resource

Environment Summary

Linux-5.1.15-arch1-1-ARCH-x86_64-with-arch
Python 3.7.3
Shell: bash

azure-cli 2.0.67
acr 2.2.9


Extensions:
aks-preview 0.4.5
azure-devops 0.11.0

Additional Context

The issue is not reproducible on every machine. Re-installation of azure-cli with or without extensions does not change anything.

The output from az provider list, part related with Microsoft.Cdn: microsoft.cdn.log

Additionally:

% az provider show -n Microsoft.Cdn --query "resourceTypes[?resourceType=='sites'].locations"
[]

Related community question: https://social.msdn.microsoft.com/Forums/en-US/1ecd2eb5-06ec-41ef-8043-c621f37125df/no-registered-resource-provider-found-for-location?forum=azurescripting

carbolymer avatar Jul 01 '19 12:07 carbolymer

This issue seems to be caused due to conflicting dependencies between the ACR cli package and the ACR management package. The latest azure cli version seems to require a release candidate for azure-mgmt. Workaround is to downgrade azure-mgmt-containerregistry to version 2.8.0.

ERROR: azure-cli-acr 2.2.9 has requirement azure-mgmt-containerregistry==2.8.0, but you'll have azure-mgmt-containerregistry 3.0.0rc3 which is incompatible.

denniseik avatar Jul 09 '19 12:07 denniseik

@carbolymer could you please update your azure-cli to 2.0.68 and try again? Thank you.

jaysterp avatar Jul 11 '19 15:07 jaysterp

After update to 2.0.68, the issue no longer persists.

carbolymer avatar Jul 11 '19 16:07 carbolymer