Azure / Azure/azure-cli

az network dns record-set ns delete fails on API version

Open
#26,929 5 comments 0 reactions 0 assignees View on GitHub
act-quality-productivity-squad Auto-Assign Auto-Resolve bug customer-reported Network - DNS Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### Describe the bug

The cli command:
az network dns record-set ns delete
fails with the following error:
(NoRegisteredProviderFound) No registered resource provider found for location 'global' and API version '2023-07-01-preview' for type 'dnszones/NS'. The supported api-versions are '2015-05-04-preview, 2016-04-01, 2017-09-01, 2017-09-15-preview, 2017-10-01, 2018-03-01-preview, 2018-05-01'. The supported locations are ', global'.
Code: NoRegisteredProviderFound

### Related command

az network dns record-set ns delete

### Errors

(NoRegisteredProviderFound) No registered resource provider found for location 'global' and API version '2023-07-01-preview' for type 'dnszones/NS'. The supported api-versions are '2015-05-04-preview, 2016-04-01, 2017-09-01, 2017-09-15-preview, 2017-10-01, 2018-03-01-preview, 2018-05-01'. The supported locations are ', global'.
Code: NoRegisteredProviderFound

### Issue script & Debug output

az network dns record-set ns delete -g "xxx" -z "yyy" -n "zzz" --debug
cli.knack.cli: Command arguments: ['network', 'dns', 'record-set', 'ns', 'delete', '-g', 'xxx', '-z', 'yyy', '-n', 'zzz', '--debug']
cli.knack.cli: __init__ debug log:
Enable color in terminal.
Enable VT mode.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [, , ]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'network': ['azure.cli.command_modules.network', 'azure.cli.command_modules.privatedns']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: network 0.733 115 457
cli.azure.cli.core: privatedns 0.006 14 66
cli.azure.cli.core: Total (2) 0.740 129 523
cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_ai_examples', 'azext_next']
cli.azure.cli.core: Loading extensions:
cli.azure.cli.core: Name Load Time Groups Commands Directory
cli.azure.cli.core: Total (0) 0.000 0 0
cli.azure.cli.core: Loaded 128 groups, 523 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : network dns record-set ns delete
cli.azure.cli.core: Command table: network dns record-set ns delete
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate []
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to 'C:\Users\claudio.mesyngier\.azure\commands\2023-07-18.16-50-51.network_dns_record-set_ns_delete.24156.log'.
az_command_data_logger: command args: network dns record-set ns delete -g {} -z {} -n {} --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [.add_subscription_parameter at 0x046D2850>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [.add_ids_arguments at 0x046EF778>, .add_cache_arguments at 0x046EF970>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [, , .parse_ids_arguments at 0x046EF928>]
Are you sure you want to perform this operation? (y/n): y
cli.azure.cli.core.auth.persistence: build_persistence: location='C:\\Users\\aaa\\.azure\\msal_token_cache.bin', encrypt=True
cli.azure.cli.core.auth.binary_cache: load: C:\Users\claudio.mesyngier\.azure\msal_http_cache.bin
urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
urllib3.connectionpool: Starting new HTTPS connection (1): login.microsoftonline.com:443
urllib3.connectionpool: https://login.microsoftonline.com:443 "GET /qqq/v2.0/.well-known/openid-configuration HTTP/1.1" 200 1753
cli.azure.cli.core.auth.binary_cache: save: C:\Users\claudio.mesyngier\.azure\msal_http_cache.bin
cli.azure.cli.core.auth.binary_cache: save: C:\Users\claudio.mesyngier\.azure\msal_http_cache.bin
cli.azure.cli.core.auth.binary_cache: save: C:\Users\claudio.mesyngier\.azure\msal_http_cache.bin
msal.authority: openid_config = {'token_endpoint': 'https://login.microsoftonline.com/qqq/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/qqq/discovery/v2.0/keys', 'response_modes_supported': ['query', 'fragment', 'form_post'], 'subject_types_supported': ['pairwise'], 'id_token_signing_alg_values_supported': ['RS256'], 'response_types_supported': ['code', 'id_token', 'code id_token', 'id_token token'], 'scopes_supported': ['openid', 'profile', 'email', 'offline_access'], 'issuer': 'https://login.microsoftonline.com/qqq/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/qqq/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/qqq/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/qqq/oauth2/v2.0/logout', 'claims_supported': ['sub', 'iss', 'cloud_instance_name', 'cloud_instance_host_name', 'cloud_graph_host_name', 'msgraph_host', 'aud', 'exp', 'iat', 'auth_time', 'acr', 'nonce', 'preferred_username', 'name', 'tid', 'ver', 'at_hash', 'c_hash', 'email'], 'kerberos_endpoint': 'https://login.microsoftonline.com/qqq/kerberos', 'tenant_region_scope': 'EU', 'cloud_instance_name': 'microsoftonline.com', 'cloud_graph_host_name': 'graph.windows.net', 'msgraph_host': 'graph.microsoft.com', 'rbac_url': 'https://pas.windows.net'}
msal.application: Broker enabled? False
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: UserCredential.get_token: scopes=('https://management.core.windows.net//.default',), claims=None, kwargs={}
msal.application: Cache hit an AT
msal.telemetry: Generate or reuse correlation_id: 529ca7bb-cee6-4ea0-8331-f3aae474a9dd
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/5c49443f-ce4b-470d-8ba8-c9571c1de06d/resourceGroups/beachhead-dev-connect-dns/providers/Microsoft.Network/dnsZones/beachhead.dev-connect.aveva.com/NS/eucct_test?api-version=2023-07-01-preview'
cli.azure.cli.core.sdk.policies: Request method: 'DELETE'
cli.azure.cli.core.sdk.policies: Request headers:
cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': 'c74f5ad5-25ac-11ee-b582-c03eba8f1bf0'
cli.azure.cli.core.sdk.policies: 'CommandName': 'network dns record-set ns delete'
cli.azure.cli.core.sdk.policies: 'ParameterSetName': '-g -z -n --debug'
cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.50.0 (MSI) (AAZ) azsdk-python-core/1.26.0 Python/3.10.10 (Windows-10-10.0.19045-SP0)'
cli.azure.cli.core.sdk.policies: 'Authorization': '*****'
cli.azure.cli.core.sdk.policies: Request body:
cli.azure.cli.core.sdk.policies: This request has no body
urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443
urllib3.connectionpool: https://management.azure.com:443 "DELETE /subscriptions/5c49443f-ce4b-470d-8ba8-c9571c1de06d/resourceGroups/beachhead-dev-connect-dns/providers/Microsoft.Network/dnsZones/beachhead.dev-connect.aveva.com/NS/eucct_test?api-version=2023-07-01-preview HTTP/1.1" 400 360
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': '360'
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-failure-cause': 'gateway'
cli.azure.cli.core.sdk.policies: 'x-ms-request-id': '4f5c3f5c-b222-431d-9691-c66af58dfceb'
cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': '4f5c3f5c-b222-431d-9691-c66af58dfceb'
cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'CANADACENTRAL:20230718T205130Z:4f5c3f5c-b222-431d-9691-c66af58dfceb'
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: 'Date': 'Tue, 18 Jul 2023 20:51:30 GMT'
cli.azure.cli.core.sdk.policies: Response content:
cli.azure.cli.core.sdk.policies: {"error":{"code":"NoRegisteredProviderFound","message":"No registered resource provider found for location 'global' and API version '2023-07-01-preview' for type 'dnszones/NS'. The supported api-versions are '2015-05-04-preview, 2016-04-01, 2017-09-01, 2017-09-15-preview, 2017-10-01, 2018-03-01-preview, 2018-05-01'. The supported locations are ', global'."}}
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 697, in _run_job
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_command.py", line 149, in __call__
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\lib\site-packages\azure\cli\command_modules\network\aaz_compact\latest\network\dns\record_set\__cmds.py", line 877, in _handler
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\lib\site-packages\azure\cli\command_modules\network\aaz_compact\latest\network\dns\record_set\__cmds.py", line 921, 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\dns\record_set\__cmds.py", line 943, 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: (NoRegisteredProviderFound) No registered resource provider found for location 'global' and API version '2023-07-01-preview' for type 'dnszones/NS'. The supported api-versions are '2015-05-04-preview, 2016-04-01, 2017-09-01, 2017-09-15-preview, 2017-10-01, 2018-03-01-preview, 2018-05-01'. The supported locations are ', global'.
Code: NoRegisteredProviderFound
Message: No registered resource provider found for location 'global' and API version '2023-07-01-preview' for type 'dnszones/NS'. The supported api-versions are '2015-05-04-preview, 2016-04-01, 2017-09-01, 2017-09-15-preview, 2017-10-01, 2018-03-01-preview, 2018-05-01'. The supported locations are ', global'.

cli.azure.cli.core.azclierror: (NoRegisteredProviderFound) No registered resource provider found for location 'global' and API version '2023-07-01-preview' for type 'dnszones/NS'. The supported api-versions are '2015-05-04-preview, 2016-04-01, 2017-09-01, 2017-09-15-preview, 2017-10-01, 2018-03-01-preview, 2018-05-01'. The supported locations are ', global'.
Code: NoRegisteredProviderFound
Message: No registered resource provider found for location 'global' and API version '2023-07-01-preview' for type 'dnszones/NS'. The supported api-versions are '2015-05-04-preview, 2016-04-01, 2017-09-01, 2017-09-15-preview, 2017-10-01, 2018-03-01-preview, 2018-05-01'. The supported locations are ', global'.
az_command_data_logger: (NoRegisteredProviderFound) No registered resource provider found for location 'global' and API version '2023-07-01-preview' for type 'dnszones/NS'. The supported api-versions are '2015-05-04-preview, 2016-04-01, 2017-09-01, 2017-09-15-preview, 2017-10-01, 2018-03-01-preview, 2018-05-01'. The supported locations are ', global'.
Code: NoRegisteredProviderFound
Message: No registered resource provider found for location 'global' and API version '2023-07-01-preview' for type 'dnszones/NS'. The supported api-versions are '2015-05-04-preview, 2016-04-01, 2017-09-01, 2017-09-15-preview, 2017-10-01, 2018-03-01-preview, 2018-05-01'. The supported locations are ', global'.
cli.knack.cli: Event: Cli.PostExecute []
az_command_data_logger: exit code: 1
cli.__main__: Command ran in 41.848 seconds (init: 0.529, invoke: 41.319)
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 4127 in cache
telemetry.check: Negative: The C:\Users\claudio.mesyngier\.azure\telemetry.txt was modified at 2023-07-18 16:48:41.836578, which in less than 600.000000 s

### Expected behavior

The expected behavior is to that the dns record is deleted and no errors are shown

### Environment Summary

azure-cli 2.50.0

core 2.50.0
telemetry 1.0.8

Extensions:
azure-devops 0.26.0
costmanagement 0.2.1

Dependencies:
msal 1.22.0
azure-mgmt-resource 23.1.0b2

Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\claudio.mesyngier\.azure\cliextensions'

Python (Windows) 3.10.10 (tags/v3.10.10:aad5f6a, Feb 7 2023, 17:05:00) [MSC v.1929 32 bit (Intel)]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

### Additional context

It used to work with the previous version of the cli (2.49.0)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.