Multiple azure vm ressource deletion failed after moving from alpine based docker image (2.63.0) to azure linux based docker image (2.64.0 or 2.65.0) #30150
We create from azure image gallery some azure vm 'on the fly' for tests.
When the tests are done; we delete the azure vm and associated ressources (vm, disk, nic, nsg).
With alpine based azure-cli images and azcli version mcr.microsoft.com/azure-cli:2.63.0, all 4 ressources are deleted successfully.
Starting from Azure Linux based image with version mcr.microsoft.com/azure-cli:2.64.0 or mcr.microsoft.com/azure-cli:2.65.0, all 4 objects are NOT deleted. Usually, only the vm is deleted and the 3 others remains.
It looks like some kind of "delete cascade" no longer works.
Related command
To get the ressources, we use this command:
az resource list -otable --query "[?tags.DEL_TAG_SOURCE=='jenkins'&&tags.DEL_TAG=='azvmf5Ghv'].id" -otsv
This returns a list of az objects; then we delete these ressources with:
az resource delete --ids /subscriptions/aa...37/resourceGroups/srdsazurepops01/providers/Microsoft.Network/networkSecurityGroups/azvmf5GhvNSG /subscriptions/aa...37/resourceGroups/srdsazurepops01/providers/Microsoft.Network/networkInterfaces/azvmf5GhvVMNic /subscriptions/aa...37/resourceGroups/srdsazurepops01/providers/Microsoft.Compute/virtualMachines/azvmf5Ghv /subscriptions/aa...37/resourceGroups/SRDSAZUREPOPS01/providers/Microsoft.Compute/disks/azvmf5Ghv_OsDisk_1_6991439815054a0da98cd43a52abd4f9
Errors
Here is the output of the deletion command:
The command failed with an unexpected error. Here is the traceback:
can't start new thread
Traceback (most recent call last):
File "/usr/lib64/az/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 666, in execute
raise ex
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 733, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 703, in _run_job
result = cmd_copy(params)
^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 336, in __call__
return self.handler(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/command_modules/resource/custom.py", line 2111, in delete_resource
operations.append(rsrc_utils.delete())
^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/command_modules/resource/custom.py", line 4435, in delete
return self.rcf.resources.begin_delete_by_id(self.resource_id, self.api_version)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/core/tracing/decorator.py", line 76, in wrapper_use_tracer
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/mgmt/resource/resources/v2022_09_01/operations/_operations.py", line 9987, in begin_delete_by_id
return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/typing.py", line 1157, in __call__
result = self.__origin__(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/core/polling/_poller.py", line 169, in __init__
self._thread.start()
File "/usr/lib/python3.12/threading.py", line 992, in start
_start_new_thread(self._bootstrap, ())
RuntimeError: can't start new thread
To check existing issues, please visit: https://github.com/Azure/azure-cli/issues
Issue script & Debug output
Relaunch another delete command with the --debug option:
cli.knack.cli: Command arguments: ['resource', 'delete', '--ids', '/subscriptions/aa****37/resourceGroups/srdsazurepops01/providers/Microsoft.Network/networkSecurityGroups/azvmux9bANSG', '/subscriptions/aa****37/resourceGroups/srdsazurepops01/providers/Microsoft.Network/networkInterfaces/azvmux9bAVMNic', '/subscriptions/aa****37/resourceGroups/srdsazurepops01/providers/Microsoft.Compute/virtualMachines/azvmux9bA', '/subscriptions/aa****37/resourceGroups/SRDSAZUREPOPS01/providers/Microsoft.Compute/disks/azvmux9bA_OsDisk_1_a7c85691b0794f06aa7cdcbe59c148ef', '--debug']
cli.knack.cli: __init__ debug log:
Enable color in terminal.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x7f04bf4e6340>, <function OutputProducer.on_global_arguments at 0x7f04bf255440>, <function CLIQuery.on_global_arguments at 0x7f04bf286a20>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'resource': ['azure.cli.command_modules.resource']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: resource 0.247 51 231
cli.azure.cli.core: Total (1) 0.247 51 231
cli.azure.cli.core: Loaded 51 groups, 231 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : resource delete
cli.azure.cli.core: Command table: resource delete
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7f04be2d2c00>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/root/.azure/commands/2024-10-21.14-14-53.resource_delete.87.log'.
az_command_data_logger: command args: resource delete --ids {} {} {} {} --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x7f04be324040>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x7f04be326e80>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x7f04be326fc0>, <function register_upcoming_breaking_change_info.<locals>.update_breaking_change_info at 0x7f04be327060>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x7f04bf2554e0>, <function CLIQuery.handle_query_parameter at 0x7f04bf286ac0>, <function register_ids_argument.<locals>.parse_ids_arguments at 0x7f04be326f20>]
cli.azure.cli.core.commands.client_factory: Getting management service client client_type=ResourceManagementClient
cli.azure.cli.core.auth.persistence: build_persistence: location='/root/.azure/service_principal_entries.json', encrypt=False
cli.azure.cli.core.auth.persistence: build_persistence: location='/root/.azure/msal_token_cache.json', encrypt=False
cli.azure.cli.core.auth.binary_cache: load: /root/.azure/msal_http_cache.bin
urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
msal.authority: Initializing with Entra authority: https://login.microsoftonline.com/15****82
msal.authority: openid_config("https://login.microsoftonline.com/15****82/v2.0/.well-known/openid-configuration") = {'token_endpoint': 'https://login.microsoftonline.com/15****82/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/15****82/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/15****82/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/15****82/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/15****82/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/15****82/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/15****82/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? 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_credentials: ServicePrincipalCredential.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
msal.application: Cache hit an AT
msal.telemetry: Generate or reuse correlation_id: ed705318-27c2-453a-b512-c13157b653f9
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/aa****37/providers/Microsoft.Network?api-version=2022-09-01'
cli.azure.cli.core.sdk.policies: Request method: 'GET'
cli.azure.cli.core.sdk.policies: Request headers:
cli.azure.cli.core.sdk.policies: 'Accept': 'application/json'
cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': 'd752dd98-8fb6-11ef-a22d-0242ac110002'
cli.azure.cli.core.sdk.policies: 'CommandName': 'resource delete'
cli.azure.cli.core.sdk.policies: 'ParameterSetName': '--ids --debug'
cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.65.0 (RPM) azsdk-python-core/1.28.0 Python/3.12.3 (Linux-3.10.0-1160.6.1.el7.x86_64-x86_64-with-glibc2.38)'
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 "GET /subscriptions/aa****37/providers/Microsoft.Network?api-version=2022-09-01 HTTP/1.1" 200 181297
cli.azure.cli.core.sdk.policies: Response status: 200
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': '181297'
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-ratelimit-remaining-subscription-reads': '249'
cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-global-reads': '3749'
cli.azure.cli.core.sdk.policies: 'x-ms-request-id': '0f207e21-9b6b-4bba-9736-4564e24720b5'
cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': '0f207e21-9b6b-4bba-9736-4564e24720b5'
cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'FRANCECENTRAL:20241021T141454Z:0f207e21-9b6b-4bba-9736-4564e24720b5'
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: A69A15E703F748E0AC82E657FE7CA08D Ref B: AMS231020614031 Ref C: 2024-10-21T14:14:53Z'
cli.azure.cli.core.sdk.policies: 'Date': 'Mon, 21 Oct 2024 14:14:53 GMT'
cli.azure.cli.core.sdk.policies: Response content:
cli.azure.cli.core.sdk.policies: ****
cli.azure.cli.core.commands.client_factory: Getting management service client client_type=ResourceManagementClient
urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
msal.authority: Initializing with Entra authority: https://login.microsoftonline.com/15****82
msal.authority: openid_config("https://login.microsoftonline.com/15****82/v2.0/.well-known/openid-configuration") = {'token_endpoint': 'https://login.microsoftonline.com/15****82/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/15****82/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/15****82/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/15****82/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/15****82/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/15****82/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/15****82/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? 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_credentials: ServicePrincipalCredential.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
msal.application: Cache hit an AT
msal.telemetry: Generate or reuse correlation_id: 702d6257-a7e9-414d-81ca-2f38e3a9b5b5
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/aa****37/providers/Microsoft.Network?api-version=2022-09-01'
cli.azure.cli.core.sdk.policies: Request method: 'GET'
cli.azure.cli.core.sdk.policies: Request headers:
cli.azure.cli.core.sdk.policies: 'Accept': 'application/json'
cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': 'd752dd98-8fb6-11ef-a22d-0242ac110002'
cli.azure.cli.core.sdk.policies: 'CommandName': 'resource delete'
cli.azure.cli.core.sdk.policies: 'ParameterSetName': '--ids --debug'
cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.65.0 (RPM) azsdk-python-core/1.28.0 Python/3.12.3 (Linux-3.10.0-1160.6.1.el7.x86_64-x86_64-with-glibc2.38)'
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 "GET /subscriptions/aa****37/providers/Microsoft.Network?api-version=2022-09-01 HTTP/1.1" 200 181297
cli.azure.cli.core.sdk.policies: Response status: 200
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': '181297'
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-ratelimit-remaining-subscription-reads': '249'
cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-global-reads': '3749'
cli.azure.cli.core.sdk.policies: 'x-ms-request-id': '3fb7d403-3f40-4021-aa92-f03da9db5e0c'
cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': '3fb7d403-3f40-4021-aa92-f03da9db5e0c'
cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'SWITZERLANDWEST:20241021T141454Z:3fb7d403-3f40-4021-aa92-f03da9db5e0c'
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: A2F257F13EBE40E4AA1F9640DBC53C2F Ref B: AMS231020512017 Ref C: 2024-10-21T14:14:54Z'
cli.azure.cli.core.sdk.policies: 'Date': 'Mon, 21 Oct 2024 14:14:54 GMT'
cli.azure.cli.core.sdk.policies: Response content:
cli.azure.cli.core.sdk.policies: ****
cli.azure.cli.core.commands.client_factory: Getting management service client client_type=ResourceManagementClient
urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
msal.authority: Initializing with Entra authority: https://login.microsoftonline.com/15****82
msal.authority: openid_config("https://login.microsoftonline.com/15****82/v2.0/.well-known/openid-configuration") = {'token_endpoint': 'https://login.microsoftonline.com/15****82/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/15****82/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/15****82/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/15****82/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/15****82/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/15****82/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/15****82/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? 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_credentials: ServicePrincipalCredential.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
msal.application: Cache hit an AT
msal.telemetry: Generate or reuse correlation_id: c217e614-a4ad-4aee-92b4-ca603b6ecdae
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/aa****37/providers/Microsoft.Compute?api-version=2022-09-01'
cli.azure.cli.core.sdk.policies: Request method: 'GET'
cli.azure.cli.core.sdk.policies: Request headers:
cli.azure.cli.core.sdk.policies: 'Accept': 'application/json'
cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': 'd752dd98-8fb6-11ef-a22d-0242ac110002'
cli.azure.cli.core.sdk.policies: 'CommandName': 'resource delete'
cli.azure.cli.core.sdk.policies: 'ParameterSetName': '--ids --debug'
cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.65.0 (RPM) azsdk-python-core/1.28.0 Python/3.12.3 (Linux-3.10.0-1160.6.1.el7.x86_64-x86_64-with-glibc2.38)'
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 "GET /subscriptions/aa****37/providers/Microsoft.Compute?api-version=2022-09-01 HTTP/1.1" 200 90093
cli.azure.cli.core.sdk.policies: Response status: 200
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': '90093'
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-ratelimit-remaining-subscription-reads': '249'
cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-global-reads': '3749'
cli.azure.cli.core.sdk.policies: 'x-ms-request-id': '02f5be3d-5bf2-443d-8b40-efadda35c4d1'
cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': '02f5be3d-5bf2-443d-8b40-efadda35c4d1'
cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'FRANCECENTRAL:20241021T141455Z:02f5be3d-5bf2-443d-8b40-efadda35c4d1'
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: F65BAAAA2A744BA4AF9F770C6AC82C33 Ref B: AMS231020512033 Ref C: 2024-10-21T14:14:55Z'
cli.azure.cli.core.sdk.policies: 'Date': 'Mon, 21 Oct 2024 14:14:54 GMT'
cli.azure.cli.core.sdk.policies: Response content:
cli.azure.cli.core.sdk.policies: ****
cli.azure.cli.core.commands.client_factory: Getting management service client client_type=ResourceManagementClient
urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
msal.authority: Initializing with Entra authority: https://login.microsoftonline.com/15****82
msal.authority: openid_config("https://login.microsoftonline.com/15****82/v2.0/.well-known/openid-configuration") = {'token_endpoint': 'https://login.microsoftonline.com/15****82/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/15****82/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/15****82/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/15****82/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/15****82/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/15****82/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/15****82/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? 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_credentials: ServicePrincipalCredential.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
msal.application: Cache hit an AT
msal.telemetry: Generate or reuse correlation_id: 0bab03bb-3af6-429a-901d-44de69c9b5e7
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/aa****37/providers/Microsoft.Compute?api-version=2022-09-01'
cli.azure.cli.core.sdk.policies: Request method: 'GET'
cli.azure.cli.core.sdk.policies: Request headers:
cli.azure.cli.core.sdk.policies: 'Accept': 'application/json'
cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': 'd752dd98-8fb6-11ef-a22d-0242ac110002'
cli.azure.cli.core.sdk.policies: 'CommandName': 'resource delete'
cli.azure.cli.core.sdk.policies: 'ParameterSetName': '--ids --debug'
cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.65.0 (RPM) azsdk-python-core/1.28.0 Python/3.12.3 (Linux-3.10.0-1160.6.1.el7.x86_64-x86_64-with-glibc2.38)'
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 "GET /subscriptions/aa****37/providers/Microsoft.Compute?api-version=2022-09-01 HTTP/1.1" 200 90093
cli.azure.cli.core.sdk.policies: Response status: 200
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': '90093'
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-ratelimit-remaining-subscription-reads': '249'
cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-global-reads': '3749'
cli.azure.cli.core.sdk.policies: 'x-ms-request-id': '34b1a7ed-c7c9-4f15-b895-6570718cb542'
cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': '34b1a7ed-c7c9-4f15-b895-6570718cb542'
cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'FRANCECENTRAL:20241021T141455Z:34b1a7ed-c7c9-4f15-b895-6570718cb542'
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: EA3EC58C5314414FA0F146BC6A0656F5 Ref B: AMS231032607007 Ref C: 2024-10-21T14:14:55Z'
cli.azure.cli.core.sdk.policies: 'Date': 'Mon, 21 Oct 2024 14:14:55 GMT'
cli.azure.cli.core.sdk.policies: Response content:
cli.azure.cli.core.sdk.policies: ****
cli.azure.cli.command_modules.resource.custom: Start new loop to delete resources.
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/aa****37/resourceGroups/srdsazurepops01/providers/Microsoft.Network/networkSecurityGroups/azvmux9bANSG?api-version=2024-05-01'
cli.azure.cli.core.sdk.policies: Request method: 'DELETE'
cli.azure.cli.core.sdk.policies: Request headers:
cli.azure.cli.core.sdk.policies: 'Accept': 'application/json'
cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': 'd752dd98-8fb6-11ef-a22d-0242ac110002'
cli.azure.cli.core.sdk.policies: 'CommandName': 'resource delete'
cli.azure.cli.core.sdk.policies: 'ParameterSetName': '--ids --debug'
cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.65.0 (RPM) azsdk-python-core/1.28.0 Python/3.12.3 (Linux-3.10.0-1160.6.1.el7.x86_64-x86_64-with-glibc2.38)'
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: https://management.azure.com:443 "DELETE /subscriptions/aa****37/resourceGroups/srdsazurepops01/providers/Microsoft.Network/networkSecurityGroups/azvmux9bANSG?api-version=2024-05-01 HTTP/1.1" 400 606
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': '606'
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': '510bb643-53c9-48b1-bd09-93c55bed6aac'
cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': '69745624-03c0-4c27-be19-4a421a3d4808'
cli.azure.cli.core.sdk.policies: 'x-ms-arm-service-request-id': '07c6aa42-530f-414d-aec1-02865c0e8643'
cli.azure.cli.core.sdk.policies: 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-deletes': '199'
cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-global-deletes': '2999'
cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'FRANCECENTRAL:20241021T141456Z:69745624-03c0-4c27-be19-4a421a3d4808'
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: 5C7F1D5BEED44F4E87B05933F00947BD Ref B: AMS231020614031 Ref C: 2024-10-21T14:14:56Z'
cli.azure.cli.core.sdk.policies: 'Date': 'Mon, 21 Oct 2024 14:14:55 GMT'
cli.azure.cli.core.sdk.policies: Response content:
cli.azure.cli.core.sdk.policies: {"error":{"code":"InUseNetworkSecurityGroupCannotBeDeleted","message":"Network security group /subscriptions/aa****37/resourceGroups/srdsazurepops01/providers/Microsoft.Network/networkSecurityGroups/azvmux9bANSG cannot be deleted because it is in use by the following resources: /subscriptions/aa****37/resourceGroups/srdsazurepops01/providers/Microsoft.Network/networkInterfaces/azvmux9bAVMNic. In order to delete the Network security group, remove the association with the resource(s). To learn how to do this, see aka.ms/deletensg.","details":[]}}
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/aa****37/resourceGroups/srdsazurepops01/providers/Microsoft.Network/networkInterfaces/azvmux9bAVMNic?api-version=2024-05-01'
cli.azure.cli.core.sdk.policies: Request method: 'DELETE'
cli.azure.cli.core.sdk.policies: Request headers:
cli.azure.cli.core.sdk.policies: 'Accept': 'application/json'
cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': 'd752dd98-8fb6-11ef-a22d-0242ac110002'
cli.azure.cli.core.sdk.policies: 'CommandName': 'resource delete'
cli.azure.cli.core.sdk.policies: 'ParameterSetName': '--ids --debug'
cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.65.0 (RPM) azsdk-python-core/1.28.0 Python/3.12.3 (Linux-3.10.0-1160.6.1.el7.x86_64-x86_64-with-glibc2.38)'
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: https://management.azure.com:443 "DELETE /subscriptions/aa****37/resourceGroups/srdsazurepops01/providers/Microsoft.Network/networkInterfaces/azvmux9bAVMNic?api-version=2024-05-01 HTTP/1.1" 400 504
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': '504'
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': '4abe58c8-a9ba-483f-bbcf-9740e1ae01ba'
cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': 'fe50a979-0c41-4896-89e1-a9ff1100e823'
cli.azure.cli.core.sdk.policies: 'x-ms-arm-service-request-id': '6da68060-cd5f-4bb8-8cde-dbdad2d3c68a'
cli.azure.cli.core.sdk.policies: 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-deletes': '199'
cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-global-deletes': '2999'
cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'SWITZERLANDWEST:20241021T141457Z:fe50a979-0c41-4896-89e1-a9ff1100e823'
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: F9FD816E50CE46AEA6CA6576F2D921D3 Ref B: AMS231020512017 Ref C: 2024-10-21T14:14:56Z'
cli.azure.cli.core.sdk.policies: 'Date': 'Mon, 21 Oct 2024 14:14:56 GMT'
cli.azure.cli.core.sdk.policies: Response content:
cli.azure.cli.core.sdk.policies: {"error":{"code":"NicInUse","message":"Network Interface /subscriptions/aa****37/resourceGroups/srdsazurepops01/providers/Microsoft.Network/networkInterfaces/azvmux9bAVMNic is used by existing resource /subscriptions/aa****37/resourceGroups/srdsazurepops01/providers/Microsoft.Compute/virtualMachines/azvmux9bA. In order to delete the network interface, it must be dissociated from the resource. To learn more, see aka.ms/deletenic.","details":[]}}
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/aa****37/resourceGroups/srdsazurepops01/providers/Microsoft.Compute/virtualMachines/azvmux9bA?api-version=2024-07-01'
cli.azure.cli.core.sdk.policies: Request method: 'DELETE'
cli.azure.cli.core.sdk.policies: Request headers:
cli.azure.cli.core.sdk.policies: 'Accept': 'application/json'
cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': 'd752dd98-8fb6-11ef-a22d-0242ac110002'
cli.azure.cli.core.sdk.policies: 'CommandName': 'resource delete'
cli.azure.cli.core.sdk.policies: 'ParameterSetName': '--ids --debug'
cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.65.0 (RPM) azsdk-python-core/1.28.0 Python/3.12.3 (Linux-3.10.0-1160.6.1.el7.x86_64-x86_64-with-glibc2.38)'
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: https://management.azure.com:443 "DELETE /subscriptions/aa****37/resourceGroups/srdsazurepops01/providers/Microsoft.Compute/virtualMachines/azvmux9bA?api-version=2024-07-01 HTTP/1.1" 202 0
cli.azure.cli.core.sdk.policies: Response status: 202
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: 'Expires': '-1'
cli.azure.cli.core.sdk.policies: 'Location': ****
cli.azure.cli.core.sdk.policies: 'Retry-After': '10'
cli.azure.cli.core.sdk.policies: 'Azure-AsyncOperation':****
cli.azure.cli.core.sdk.policies: 'azure-asyncnotification': 'Enabled'
cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-resource': 'Microsoft.Compute/DeleteVMSubscriptionMaximum;1499,Microsoft.Compute/DeleteVMResource;11'
cli.azure.cli.core.sdk.policies: 'x-ms-need-to-refresh-epl-cache': 'False'
cli.azure.cli.core.sdk.policies: 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
cli.azure.cli.core.sdk.policies: 'x-ms-request-id': '13d7905d-7830-4c79-8d2b-bae0b69abf8c'
cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-deletes': '199'
cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-global-deletes': '2999'
cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': 'da749d22-c69d-431f-8eea-370f8e764bdc'
cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'FRANCESOUTH:20241021T141458Z:da749d22-c69d-431f-8eea-370f8e764bdc'
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: 4EFA6FD24263416C9F791E5947AE318B Ref B: AMS231020512033 Ref C: 2024-10-21T14:14:57Z'
cli.azure.cli.core.sdk.policies: 'Date': 'Mon, 21 Oct 2024 14:14:57 GMT'
cli.azure.cli.core.sdk.policies: 'Content-Length': '0'
cli.azure.cli.core.sdk.policies: Response content:
cli.azure.cli.core.sdk.policies:
cli.azure.cli.core.azclierror: Traceback (most recent call last):
File "/usr/lib64/az/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 666, in execute
raise ex
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 733, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 703, in _run_job
result = cmd_copy(params)
^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 336, in __call__
return self.handler(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/command_modules/resource/custom.py", line 2111, in delete_resource
operations.append(rsrc_utils.delete())
^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/command_modules/resource/custom.py", line 4435, in delete
return self.rcf.resources.begin_delete_by_id(self.resource_id, self.api_version)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/core/tracing/decorator.py", line 76, in wrapper_use_tracer
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/mgmt/resource/resources/v2022_09_01/operations/_operations.py", line 9987, in begin_delete_by_id
return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/typing.py", line 1157, in __call__
result = self.__origin__(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/core/polling/_poller.py", line 169, in __init__
self._thread.start()
File "/usr/lib/python3.12/threading.py", line 992, in start
_start_new_thread(self._bootstrap, ())
RuntimeError: can't start new thread
cli.azure.cli.core.azclierror: The command failed with an unexpected error. Here is the traceback:
az_command_data_logger: The command failed with an unexpected error. Here is the traceback:
cli.azure.cli.core.azclierror: can't start new thread
Traceback (most recent call last):
File "/usr/lib64/az/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 666, in execute
raise ex
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 733, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 703, in _run_job
result = cmd_copy(params)
^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 336, in __call__
return self.handler(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/command_modules/resource/custom.py", line 2111, in delete_resource
operations.append(rsrc_utils.delete())
^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/command_modules/resource/custom.py", line 4435, in delete
return self.rcf.resources.begin_delete_by_id(self.resource_id, self.api_version)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/core/tracing/decorator.py", line 76, in wrapper_use_tracer
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/mgmt/resource/resources/v2022_09_01/operations/_operations.py", line 9987, in begin_delete_by_id
return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/typing.py", line 1157, in __call__
result = self.__origin__(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/core/polling/_poller.py", line 169, in __init__
self._thread.start()
File "/usr/lib/python3.12/threading.py", line 992, in start
_start_new_thread(self._bootstrap, ())
RuntimeError: can't start new thread
az_command_data_logger: can't start new thread
Traceback (most recent call last):
File "/usr/lib64/az/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 666, in execute
raise ex
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 733, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 703, in _run_job
result = cmd_copy(params)
^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 336, in __call__
return self.handler(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/command_modules/resource/custom.py", line 2111, in delete_resource
operations.append(rsrc_utils.delete())
^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/command_modules/resource/custom.py", line 4435, in delete
return self.rcf.resources.begin_delete_by_id(self.resource_id, self.api_version)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/core/tracing/decorator.py", line 76, in wrapper_use_tracer
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/mgmt/resource/resources/v2022_09_01/operations/_operations.py", line 9987, in begin_delete_by_id
return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/typing.py", line 1157, in __call__
result = self.__origin__(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/core/polling/_poller.py", line 169, in __init__
self._thread.start()
File "/usr/lib/python3.12/threading.py", line 992, in start
_start_new_thread(self._bootstrap, ())
RuntimeError: can't start new thread
To check existing issues, please visit: https://github.com/Azure/azure-cli/issues
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7f04be2d2e80>]
az_command_data_logger: exit code: 1
cli.__main__: Command ran in 5.638 seconds (init: 0.167, invoke: 5.471)
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 7833 in cache file under /root/.azure/telemetry/20241021141458614
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "/usr/bin/python3.12 /usr/lib/az/lib/python3.12/site-packages/azure/cli/telemetry/__init__.py /root/.azure /root/.azure/telemetry/20241021141458614"
telemetry.process: Return from creating process 91
telemetry.main: Finish creating telemetry upload process.
Expected behavior
All objects associated to the VM should be deleted using mcr.microsoft.com/azure-cli:2.65.0 docker image.
Environment Summary
az --version
azure-cli 2.65.0
core 2.65.0
telemetry 1.1.0
Dependencies:
msal 1.31.0
azure-mgmt-resource 23.1.1
Python location '/usr/bin/python3.12'
Extensions directory '/root/.azure/cliextensions'
Python (Linux) 3.12.3 (main, Aug 24 2024, 02:10:35) [GCC 13.2.0]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date.
Describe the bug
We create from azure image gallery some azure vm 'on the fly' for tests. When the tests are done; we delete the azure vm and associated ressources (vm, disk, nic, nsg).
With alpine based azure-cli images and azcli version
mcr.microsoft.com/azure-cli:2.63.0
, all 4 ressources are deleted successfully.Starting from Azure Linux based image with version
mcr.microsoft.com/azure-cli:2.64.0
ormcr.microsoft.com/azure-cli:2.65.0
, all 4 objects are NOT deleted. Usually, only the vm is deleted and the 3 others remains.It looks like some kind of "delete cascade" no longer works.
Related command
To get the ressources, we use this command:
az resource list -otable --query "[?tags.DEL_TAG_SOURCE=='jenkins'&&tags.DEL_TAG=='azvmf5Ghv'].id" -otsv
This returns a list of az objects; then we delete these ressources with:
az resource delete --ids /subscriptions/aa...37/resourceGroups/srdsazurepops01/providers/Microsoft.Network/networkSecurityGroups/azvmf5GhvNSG /subscriptions/aa...37/resourceGroups/srdsazurepops01/providers/Microsoft.Network/networkInterfaces/azvmf5GhvVMNic /subscriptions/aa...37/resourceGroups/srdsazurepops01/providers/Microsoft.Compute/virtualMachines/azvmf5Ghv /subscriptions/aa...37/resourceGroups/SRDSAZUREPOPS01/providers/Microsoft.Compute/disks/azvmf5Ghv_OsDisk_1_6991439815054a0da98cd43a52abd4f9
Errors
Here is the output of the deletion command:
Issue script & Debug output
Relaunch another delete command with the
--debug
option:Expected behavior
All objects associated to the VM should be deleted using
mcr.microsoft.com/azure-cli:2.65.0
docker image.Environment Summary
Additional context
No response