Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsupported API version '2020-04-01' for Network Resource. MS is fixing it. #13827

Closed
ezYakaEagle442 opened this issue Jun 4, 2020 · 25 comments
Assignees
Labels
Network az network vnet/lb/nic/dns/etc... Service Attention This issue is responsible by Azure service team.
Milestone

Comments

@ezYakaEagle442
Copy link

ezYakaEagle442 commented Jun 4, 2020

az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

Describe the bug

CLI 2.7.0 fails to run command az network vnet show

To Reproduce

sudo apt-get install -y apt-transport-https
# https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-apt?view=azure-cli-latest
curl -sL https://packages.microsoft.com/keys/microsoft.asc |
    gpg --dearmor |
    sudo tee /etc/apt/trusted.gpg.d/microsoft.asc.gpg > /dev/null

##### git bash for windows based on Ubuntu
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
sudo apt-get update
sudo apt-get install ca-certificates curl apt-transport-https lsb-release gnupg

AZ_REPO=$(lsb_release -cs)
echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $AZ_REPO main" | 
    sudo tee /etc/apt/sources.list.d/azure-cli.list

sudo apt-get update
apt search azure-cli 
apt-cache search azure-cli 
apt list azure-cli -a
sudo apt-get install azure-cli # azure-cli=2.5.0-1~bionic
sudo apt-get update && sudo apt-get install --only-upgrade -y azure-cli
sudo apt-get upgrade azure-cli
az login

az vm create --name $bastion_name \
    --image UbuntuLTS \
    --admin-username $bastion_admin_username \
    --resource-group $rg_bastion_name \
    --vnet-name $vnet_bastion_name \
    --subnet ManagementSubnet \
    --nsg $b_nsg \
    --size Standard_B1s \
    --zone 1 \
    --location $location \
    --ssh-key-values ~/.ssh/$ssh_key.pub

vnet_id=$(az network vnet show --resource-group $rg_name --name $vnet_name --query id -o tsv)
echo "VNet Id :" $vnet_id	

master_subnet_id=$(az network vnet subnet show --name $master_subnet_name --vnet-name $vnet_name  -g $rg_name --query id -o tsv)
echo "Master Subnet Id :" $master_subnet_id	

worker_subnet_id=$(az network vnet subnet show --name $worker_subnet_name --vnet-name $vnet_name -g $rg_name --query id -o tsv)
echo "Worker Subnet Id :" $worker_subnet_id	

ilb_subnet_id=$(az network vnet subnet show --resource-group $rg_name --vnet-name  $vnet_name --name $ilb_subnet_name --query id -o tsv)
echo "Internal Load BalancerLB Subnet Id :" $ilb_subnet_id	

bastion_vnet_id=$(az network vnet show --name $vnet_bastion_name -g $rg_bastion_name --query id -o tsv)
echo "Bastion VNet Id :" $bastion_vnet_id	

bastion_subnet_id=$(az network vnet subnet show --name $subnet_bastion_name --vnet-name $vnet_bastion_name -g $rg_bastion_name --query id -o tsv)
echo "Bastion Subnet Id :" $bastion_subnet_id	

acr_registry_id=$(az acr show --name $acr_registry_name --resource-group $rg_name --query "id" --output tsv)
echo "ACR registry ID :" $acr_registry_id

Expected behavior

az network vnet show command should run successfully

Environment summary

az version
{
"azure-cli": "2.7.0",
"azure-cli-command-modules-nspkg": "2.0.3",
"azure-cli-core": "2.7.0",
"azure-cli-nspkg": "3.0.4",
"azure-cli-telemetry": "1.0.4",
"extensions": {}
}

Additional context

@ghost ghost added needs-triage This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Jun 4, 2020
@triage-new-issues triage-new-issues bot removed the triage label Jun 4, 2020
@ezYakaEagle442
Copy link
Author

sudo apt remove azure-cli
sudo apt-get install azure-cli=2.5.1-1~bionic

This fixed the issue, looks like a regression in CLI v2.7.0 ...

@Smoovsky
Copy link

Smoovsky commented Jun 4, 2020

Not just CLI, the portal also fails a lot of types of requests with the same error reason.
Looks like MS retracted Api version of 2020-04-01, but left many applications unchanged.

@usrme
Copy link

usrme commented Jun 4, 2020

I am also having issues with deploying network type resources in any region at the moment. This is not just an issue with the CLI. Posting this here is because I can't find any official page where this issue is discussed or mentioned.

@chencivalue
Copy link

Same issue here:

Failed to add peering 'xxx'. Error: No registered resource provider found for location 'westeurope' and API version '2020-04-01' for type 'virtualNetworks'. The supported api-versions are '2014-12-01-preview, 2015-05-01-preview, 2015-06-15, 2016-03-30, 2016-06-01, 2016-07-01, 2016-08-01, 2016-09-01, 2016-10-01, 2016-11-01, 2016-12-01, 2017-03-01, 2017-04-01, 2017-06-01, 2017-08-01, 2017-09-01, 2017-10-01, 2017-11-01, 2018-01-01, 2018-02-01, 2018-03-01, 2018-04-01, 2018-05-01, 2018-06-01, 2018-07-01, 2018-08-01, 2018-10-01, 2018-11-01, 2018-12-01, 2019-02-01, 2019-04-01, 2019-06-01, 2019-07-01, 2019-08-01, 2019-09-01, 2019-11-01, 2019-12-01, 2020-01-01, 2020-03-01'. The supported locations are 'westus, eastus, northeurope, westeurope, eastasia, southeastasia, northcentralus, southcentralus, centralus, eastus2, japaneast, japanwest, brazilsouth, australiaeast, australiasoutheast, centralindia, southindia, westindia, canadacentral, canadaeast, westcentralus, westus2, ukwest, uksouth, koreacentral, koreasouth, francecentral, australiacentral, southafricanorth, uaenorth'..

@usrme
Copy link

usrme commented Jun 4, 2020

Is anybody able to find any official mention of this underlying issue?

@mortenlerudjordet
Copy link

mortenlerudjordet commented Jun 4, 2020

Have this issue. If you look at the supported api version the new one is not in the list.
((Get-AzResourceProvider -ProviderNamespace Microsoft.Network).ResourceTypes | Where-Object ResourceTypeName -eq networkProfiles).ApiVersions

2020-03-01
2020-01-01
2019-12-01
2019-11-01
2019-09-01
2019-08-01
2019-07-01
2019-06-01
2019-04-01
2019-02-01
2018-12-01
2018-11-01
2018-10-01
2018-08-01
2018-07-01
2018-06-01
2018-05-01

No 2020-04-01

Fix is to run an older version of az-cli

@usrme
Copy link

usrme commented Jun 4, 2020

@mortenlerudjordet, but if you try to just deploy a simple virtual machine in the Azure Portal, then that fails as well 😄

EDIT:

The error message one gets:

{
    "error": {
        "code": "InvalidGatewayHost",
        "message": "Host name resolution failed for 'Microsoft.Network'; cannot fulfill the request."
    }
}

@Smoovsky
Copy link

Smoovsky commented Jun 4, 2020

@mortenlerudjordet, but if you try to just deploy a simple virtual machine in the Azure Portal, then that fails as well 😄

You can either use an older version of az-cli or fix the api version manually in the rest request. Let's hope MS fix this soon

@JorTurFer
Copy link

+1 when I try to recover an publicIPAddresses

@usrme
Copy link

usrme commented Jun 4, 2020

Here are some potentially useful links about this:

Starting at 08:45 UTC on 04 Jun 2020, some customers may experience issues with resource creation for services that depend on the Azure Resource Manager (ARM) platform. We are aware of this issue and are actively investigating. The next update will be provided in 60 minutes, or as events warrant. This message was last updated at 11:37 UTC on 04 June 2020

@yonzhan yonzhan added the Network az network vnet/lb/nic/dns/etc... label Jun 4, 2020
@ghost ghost removed the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Jun 4, 2020
@yonzhan yonzhan added this to the S171 milestone Jun 4, 2020
@yonzhan yonzhan removed the question The issue doesn't require a change to the product in order to be resolved. Most issues start as that label Jun 4, 2020
@yonzhan
Copy link
Collaborator

yonzhan commented Jun 4, 2020

add to S171

@yonzhan yonzhan added the Service Attention This issue is responsible by Azure service team. label Jun 4, 2020
@ghost
Copy link

ghost commented Jun 4, 2020

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

@mmyyrroonn mmyyrroonn changed the title Azure No registered resource provider found for location 'westeurope' and API version '2020-04-01' for type 'virtualNetworks' Unsupported API version '2020-04-01' for Network Resource. MS is fixing it. Jun 4, 2020
@mmyyrroonn mmyyrroonn pinned this issue Jun 4, 2020
@mmyyrroonn
Copy link
Contributor

@ezYakaEagle442 Thanks for bring this issue to us. I believe service team and ARM team are actively fixing it. I'm sorry I changed your issue's title so that I can pin this issue.

@timvanderweijde
Copy link

timvanderweijde commented Jun 4, 2020

I have the same issue with publicIPAddresses.

When can we expect a fix and is there a workaround?

@gstolz
Copy link

gstolz commented Jun 4, 2020

same here with PIP! Hope there will be a solution soon...

@mmyyrroonn
Copy link
Contributor

mmyyrroonn commented Jun 4, 2020

I have the same issue with publicIPAddresses.

When can we expect a fix and is there a workaround?

I believe this issue should be fixed soon.

A workaround is to use old version of Azure CLI. Please uninstall the 2.7.0 and install any older version. It uses 2020-03-01 api-version or before which are not affected.

@timvanderweijde
Copy link

A workaround is to use old version of Azure CLI. Please uninstall the 2.7.0 and install any older version. It uses 2020-03-01 api-version or before which are not effected.

Where can I find a MSI file for version 2.6.0? How do I install an older version? It's not described in the documentation.

@mmyyrroonn
Copy link
Contributor

mmyyrroonn commented Jun 4, 2020

A workaround is to use old version of Azure CLI. Please uninstall the 2.7.0 and install any older version. It uses 2020-03-01 api-version or before which are not effected.

Where can I find a MSI file for version 2.6.0? How do I install an older version? It's not described in the documentation.

For Windows, please use this script in powershell to install previous version such as 2.6.0.

Invoke-WebRequest -Uri https://azurecliprod.blob.core.windows.net/msi/azure-cli-2.6.0.msi -OutFile .\AzureCLI.msi; Start-Process msiexec.exe -Wait -ArgumentList '/I AzureCLI.msi /quiet'; rm .\AzureCLI.msi

You can also download other older versions through

https://azurecliprod.blob.core.windows.net/msi/azure-cli-2.6.0.msi

Sorry for the inconvenience.

@pdev1989
Copy link

pdev1989 commented Jun 4, 2020

I get the same error:
Tried with the az-cli versions: 2.4.0 and 2.0.75.

Should I use 2.6.0 specifically ?

Error I get:

msrestazure.azure_exceptions.CloudError: Azure Error: NoRegisteredProviderFound
Message: No registered resource provider found for location 'westeurope' and API version '2020-04-01' for type 'virtualNetworks'. The supported api-versions are '2014-12-01-preview, 2015-05-01-preview, 2015-06-15, 2016-03-30, 2016-06-01, 2016-07-01, 2016-08-01, 2016-09-01, 2016-10-01, 2016-11-01, 2016-12-01, 2017-03-01, 2017-04-01, 2017-06-01, 2017-08-01, 2017-09-01, 2017-10-01, 2017-11-01, 2018-01-01, 2018-02-01, 2018-03-01, 2018-04-01, 2018-05-01, 2018-06-01, 2018-07-01, 2018-08-01, 2018-10-01, 2018-11-01, 2018-12-01, 2019-02-01, 2019-04-01, 2019-06-01, 2019-07-01, 2019-08-01, 2019-09-01, 2019-11-01, 2019-12-01, 2020-01-01, 2020-03-01'. The supported locations are 'westus, eastus, northeurope, westeurope, eastasia, southeastasia, northcentralus, southcentralus, centralus, eastus2, japaneast, japanwest, brazilsouth, australiaeast, australiasoutheast, centralindia, southindia, westindia, canadacentral, canadaeast, westcentralus, westus2, ukwest, uksouth, koreacentral, koreasouth, francecentral, australiacentral, southafricanorth, uaenorth'.

@mmyyrroonn
Copy link
Contributor

I get the same error:
Tried with the az-cli versions: 2.4.0 and 2.0.75.

Should I use 2.6.0 specifically ?

Error I get:

msrestazure.azure_exceptions.CloudError: Azure Error: NoRegisteredProviderFound
Message: No registered resource provider found for location 'westeurope' and API version '2020-04-01' for type 'virtualNetworks'. The supported api-versions are '2014-12-01-preview, 2015-05-01-preview, 2015-06-15, 2016-03-30, 2016-06-01, 2016-07-01, 2016-08-01, 2016-09-01, 2016-10-01, 2016-11-01, 2016-12-01, 2017-03-01, 2017-04-01, 2017-06-01, 2017-08-01, 2017-09-01, 2017-10-01, 2017-11-01, 2018-01-01, 2018-02-01, 2018-03-01, 2018-04-01, 2018-05-01, 2018-06-01, 2018-07-01, 2018-08-01, 2018-10-01, 2018-11-01, 2018-12-01, 2019-02-01, 2019-04-01, 2019-06-01, 2019-07-01, 2019-08-01, 2019-09-01, 2019-11-01, 2019-12-01, 2020-01-01, 2020-03-01'. The supported locations are 'westus, eastus, northeurope, westeurope, eastasia, southeastasia, northcentralus, southcentralus, centralus, eastus2, japaneast, japanwest, brazilsouth, australiaeast, australiasoutheast, centralindia, southindia, westindia, canadacentral, canadaeast, westcentralus, westus2, ukwest, uksouth, koreacentral, koreasouth, francecentral, australiacentral, southafricanorth, uaenorth'.

2.4.0 should not have this issue. 2020-04-01 appears in 2.7.0 first time. Did you install multiple azure-cli in your machine? Could you confirm whether you removed 2.7.0 or not?

@mmyyrroonn
Copy link
Contributor

The latest update for this issue is on this page. https://status.azure.com/en-us/status

@RuthNjeri
Copy link

Thanks for the help @myronfanqiu , I am trying to figure out if there is a way I can specify an older version with this command for Ubuntu and Debian
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash

@mmyyrroonn
Copy link
Contributor

Thanks for the help @myronfanqiu , I am trying to figure out if there is a way I can specify an older version with this command for Ubuntu and Debian
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash

Hi. Installation method for old version in any platform can be found from here

@timvanderweijde
Copy link

I'm using CLI 2.6.0 now. It works better, but still getting weird errors. Hopefully this will be gone when the Azure ARM issue is being resolved....

For reference though:

request failed: Error occurred in request., RetryError: HTTPSConnectionPool(host='management.azure.com', port=443): Max retries exceeded with url: /subscriptions//providers/Microsoft.Network/locations/westeurope/operations/?api-version=2020-03-01 (Caused by ResponseError('too many 502 error responses',))
Error calling Azure CLI command, check previous output (above).

@gstolz
Copy link

gstolz commented Jun 4, 2020

Microsoft has fixed the problem on Azure backend side. For me az cli 2.7.0 (on Ubuntu 20.04) seems to work again!

PRELIMINARY ROOT CAUSE: Engineers determined that a recent deployment contained a configuration bug, which caused requests through the ARM deployment and management service to fail.
MITIGATION: Engineers rolled back the faulty configuration safely, which mitigated the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Network az network vnet/lb/nic/dns/etc... Service Attention This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests