Azure / azure-cli

Azure Command-Line Interface
MIT License
3.97k stars 2.95k forks source link

Different cli command are using different api-version and some of them is pretty old #28052

Open hsunhsunwenfang opened 9 months ago

hsunhsunwenfang commented 9 months ago

Describe the bug

Different cli command are using different api-version and some of them is pretty old

Related command

Command az vmss nic list --resource-group kubernetes-the-hard-way --virtual-machine-scale-set-name worker-vmss --debug

Errors

management.azure.com:443 urllib3.connectionpool: https://management.azure.com:443 "GET /subscriptions/2aa714e3-5fa4-45b2-9e3f-88f8eb04588c/resourceGroups/kubernetes-the-hard-way/providers/microsoft.Compute/virtualMachineScaleSets/worker-vmss/networkInterfaces?api-version=2016-03-30 HTTP/1.1"_ 404 261

Issue script & Debug output

Key Debug Output

management.azure.com:443 urllib3.connectionpool: https://management.azure.com:443 "GET /subscriptions/2aa714e3-5fa4-45b2-9e3f-88f8eb04588c/resourceGroups/kubernetes-the-hard-way/providers/microsoft.Compute/virtualMachineScaleSets/worker-vmss/networkInterfaces?api-version=2016-03-30 HTTP/1.1"_ 404 261

Whole Debug Output

cli.knack.cli: Command arguments: ['vmss', 'list-instances', '-g', 'kubernetes-the-hard-way', '-n', 'worker-vmss', '--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 0x7f0ad29153a0>, <function OutputProducer.on_global_arguments at 0x7f0ad28b5da0>, <function CLIQuery.on_global_arguments at 0x7f0ad28ef880>] cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate [] cli.azure.cli.core: Modules found from index for 'vmss': ['azure.cli.command_modules.vm'] cli.azure.cli.core: Loading command modules: cli.azure.cli.core: Name Load Time Groups Commands cli.azure.cli.core: vm 0.154 59 237 cli.azure.cli.core: Total (1) 0.154 59 237 cli.azure.cli.core: Loaded 59 groups, 237 commands. cli.azure.cli.core: Found a match in the command table. cli.azure.cli.core: Raw command : vmss list-instances cli.azure.cli.core: Command table: vmss list cli.azure.cli.core: remaining : instances cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7f0ad1a3cc20>] cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/home/hsunwen/.azure/commands/2023-12-18.06-42-49.vmss_list-instances.12158.log'. az_command_data_logger: command args: vmss list-instances -g {} -n {} --debug cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x7f0ad17f7100>] cli.azure.cli.core.profiles._shared: Traceback (most recent call last): File "/opt/az/lib/python3.11/site-packages/azure/cli/core/profiles/_shared.py", line 655, in _get_attr op = getattr(op, part) ^^^^^^^^^^^^^^^^^ AttributeError: module 'azure.mgmt.compute.v2022_11_01.models' has no attribute 'RestorePointEncryptionType'

cli.azure.cli.core.profiles._shared: Traceback (most recent call last): File "/opt/az/lib/python3.11/site-packages/azure/cli/core/profiles/_shared.py", line 655, in _get_attr op = getattr(op, part) ^^^^^^^^^^^^^^^^^ AttributeError: module 'azure.mgmt.compute.v2022_11_01.models' has no attribute 'RestorePointEncryptionType'

cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad [] cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x7f0ad1870ea0>, <function register_cache_arguments..add_cache_arguments at 0x7f0ad1870fe0>] cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded [] cli.knack.cli: Event: CommandInvoker.OnPreParseArgs [] cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x7f0ad28b5e40>, <function CLIQuery.handle_query_parameter at 0x7f0ad28ef920>, <function register_ids_argument..parse_ids_arguments at 0x7f0ad1870f40>] cli.azure.cli.core.auth.persistence: build_persistence: location='/home/hsunwen/.azure/msal_token_cache.json', encrypt=False cli.azure.cli.core.auth.binary_cache: load: /home/hsunwen/.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: openid_config = {'token_endpoint': 'https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/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/72f988bf-86f1-41af-91ab-2d7cd011db47/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/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/72f988bf-86f1-41af-91ab-2d7cd011db47/kerberos', 'tenant_region_scope': 'WW', '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: c8a121ee-a6da-46c4-ad2d-05a18513b359 cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/2aa714e3-5fa4-45b2-9e3f-88f8eb04588c/resourceGroups/kubernetes-the-hard-way/providers/Microsoft.Compute/virtualMachineScaleSets/worker-vmss/virtualMachines?api-version=2023-03-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': 'a91d7297-9d70-11ee-8fcd-391b046c1781' cli.azure.cli.core.sdk.policies: 'CommandName': 'vmss list-instances' cli.azure.cli.core.sdk.policies: 'ParameterSetName': '-g -n --debug' cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.55.0 (DEB) (AAZ) azsdk-python-core/1.26.0 Python/3.11.5 (Linux-6.2.0-1018-azure-x86_64-with-glibc2.35)' 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/2aa714e3-5fa4-45b2-9e3f-88f8eb04588c/resourceGroups/kubernetes-the-hard-way/providers/Microsoft.Compute/virtualMachineScaleSets/worker-vmss/virtualMachines?api-version=2023-03-01 HTTP/1.1" 200 None 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: 'Transfer-Encoding': 'chunked' cli.azure.cli.core.sdk.policies: 'Content-Type': 'application/json; charset=utf-8' cli.azure.cli.core.sdk.policies: 'Content-Encoding': 'gzip' cli.azure.cli.core.sdk.policies: 'Expires': '-1' cli.azure.cli.core.sdk.policies: 'Vary': 'Accept-Encoding' cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-resource': 'Microsoft.Compute/HighCostGetVMScaleSetSubscriptionMaximum;1079,Microsoft.Compute/HighCostGetVMScaleSetResource;29,Microsoft.Compute/VMScaleSetVMViewsSubscriptionMaximum;29998' cli.azure.cli.core.sdk.policies: 'x-ms-request-charge': '2' cli.azure.cli.core.sdk.policies: 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains' cli.azure.cli.core.sdk.policies: 'x-ms-request-id': '07bec412-9120-480b-9111-87e32149c311' cli.azure.cli.core.sdk.policies: 'Server': 'Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0' cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-reads': '11999' cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': '286be2c5-7b3a-4626-8520-76013e6bcaf2' cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'EASTASIA:20231218T064250Z:286be2c5-7b3a-4626-8520-76013e6bcaf2' cli.azure.cli.core.sdk.policies: 'X-Content-Type-Options': 'nosniff' cli.azure.cli.core.sdk.policies: 'Date': 'Mon, 18 Dec 2023 06:42:50 GMT' cli.azure.cli.core.sdk.policies: Response content: cli.azure.cli.core.sdk.policies: { "value": [ { "name": "worker-vmss_2ebadc66", "id": "/subscriptions/2aa714e3-5fa4-45b2-9e3f-88f8eb04588c/resourceGroups/kubernetes-the-hard-way/providers/Microsoft.Compute/virtualMachineScaleSets/worker-vmss/virtualMachines/worker-vmss_2ebadc66", "type": "Microsoft.Compute/virtualMachineScaleSets/virtualMachines", "location": "australiasoutheast", "instanceId": "worker-vmss_2ebadc66" }, { "name": "worker-vmss_a296a793", "id": "/subscriptions/2aa714e3-5fa4-45b2-9e3f-88f8eb04588c/resourceGroups/kubernetes-the-hard-way/providers/Microsoft.Compute/virtualMachineScaleSets/worker-vmss/virtualMachines/worker-vmss_a296a793", "type": "Microsoft.Compute/virtualMachineScaleSets/virtualMachines", "location": "australiasoutheast", "instanceId": "worker-vmss_a296a793" } ] } cli.knack.cli: Event: CommandInvoker.OnTransformResult [<function _resource_group_transform at 0x7f0ad182e020>, <function _x509_from_base64_to_hex_transform at 0x7f0ad182e0c0>] cli.knack.cli: Event: CommandInvoker.OnFilterResult [] [ { "id": "/subscriptions/2aa714e3-5fa4-45b2-9e3f-88f8eb04588c/resourceGroups/kubernetes-the-hard-way/providers/Microsoft.Compute/virtualMachineScaleSets/worker-vmss/virtualMachines/worker-vmss_2ebadc66", "instanceId": "worker-vmss_2ebadc66", "location": "australiasoutheast", "name": "worker-vmss_2ebadc66", "resourceGroup": "kubernetes-the-hard-way", "type": "Microsoft.Compute/virtualMachineScaleSets/virtualMachines" }, { "id": "/subscriptions/2aa714e3-5fa4-45b2-9e3f-88f8eb04588c/resourceGroups/kubernetes-the-hard-way/providers/Microsoft.Compute/virtualMachineScaleSets/worker-vmss/virtualMachines/worker-vmss_a296a793", "instanceId": "worker-vmss_a296a793", "location": "australiasoutheast", "name": "worker-vmss_a296a793", "resourceGroup": "kubernetes-the-hard-way", "type": "Microsoft.Compute/virtualMachineScaleSets/virtualMachines" } ] cli.knack.cli: Event: Cli.SuccessfulExecute [] cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7f0ad1a3cea0>] az_command_data_logger: exit code: 0 cli.main: Command ran in 1.612 seconds (init: 0.155, invoke: 1.457) 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 3419 in cache telemetry.main: Begin creating telemetry upload process. telemetry.process: Creating upload process: "/opt/az/bin/python3 /opt/az/lib/python3.11/site-packages/azure/cli/telemetry/init.py /home/hsunwen/.azure" telemetry.process: Return from creating process telemetry.main: Finish creating telemetry upload process. hsunwen@hsunjammyjellyfish  ~  az vmss nic list --resource-group kubernetes-the-hard-way --virtual-machine-scale-set-name worker-vmss --debug cli.knack.cli: Command arguments: ['vmss', 'nic', 'list', '--resource-group', 'kubernetes-the-hard-way', '--virtual-machine-scale-set-name', 'worker-vmss', '--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 0x7f14b8aa53a0>, <function OutputProducer.on_global_arguments at 0x7f14b8a45da0>, <function CLIQuery.on_global_arguments at 0x7f14b8a7f880>] cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate [] cli.azure.cli.core: Modules found from index for 'vmss': ['azure.cli.command_modules.vm'] cli.azure.cli.core: Loading command modules: cli.azure.cli.core: Name Load Time Groups Commands cli.azure.cli.core: vm 0.157 59 239 cli.azure.cli.core: Total (1) 0.157 59 239 cli.azure.cli.core: Loaded 59 groups, 239 commands. cli.azure.cli.core: Found a match in the command table. cli.azure.cli.core: Raw command : vmss nic list cli.azure.cli.core: Command table: vmss nic list cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7f14b7bbcc20>] cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/home/hsunwen/.azure/commands/2023-12-18.06-42-56.vmss_nic_list.12174.log'. az_command_data_logger: command args: vmss nic list --resource-group {} --virtual-machine-scale-set-name {} --debug cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x7f14b7977100>] cli.azure.cli.core.profiles._shared: Traceback (most recent call last): File "/opt/az/lib/python3.11/site-packages/azure/cli/core/profiles/_shared.py", line 655, in _get_attr op = getattr(op, part) ^^^^^^^^^^^^^^^^^ AttributeError: module 'azure.mgmt.compute.v2022_11_01.models' has no attribute 'RestorePointEncryptionType'

cli.azure.cli.core.profiles._shared: Traceback (most recent call last): File "/opt/az/lib/python3.11/site-packages/azure/cli/core/profiles/_shared.py", line 655, in _get_attr op = getattr(op, part) ^^^^^^^^^^^^^^^^^ AttributeError: module 'azure.mgmt.compute.v2022_11_01.models' has no attribute 'RestorePointEncryptionType'

cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad [] cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x7f14b79f0ea0>, <function register_cache_arguments..add_cache_arguments at 0x7f14b79f0fe0>] cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded [] cli.knack.cli: Event: CommandInvoker.OnPreParseArgs [] cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x7f14b8a45e40>, <function CLIQuery.handle_query_parameter at 0x7f14b8a7f920>, <function register_ids_argument..parse_ids_arguments at 0x7f14b79f0f40>] cli.azure.cli.core.auth.persistence: build_persistence: location='/home/hsunwen/.azure/msal_token_cache.json', encrypt=False cli.azure.cli.core.auth.binary_cache: load: /home/hsunwen/.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: openid_config = {'token_endpoint': 'https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/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/72f988bf-86f1-41af-91ab-2d7cd011db47/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/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/72f988bf-86f1-41af-91ab-2d7cd011db47/kerberos', 'tenant_region_scope': 'WW', '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: b6d3bc97-987c-4e94-908a-4a52bd19a8b9 cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/2aa714e3-5fa4-45b2-9e3f-88f8eb04588c/resourceGroups/kubernetes-the-hard-way/providers/microsoft.Compute/virtualMachineScaleSets/worker-vmss/networkInterfaces?api-version=2016-03-30' 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': 'ad60a545-9d70-11ee-8fcd-391b046c1781' cli.azure.cli.core.sdk.policies: 'CommandName': 'vmss nic list' cli.azure.cli.core.sdk.policies: 'ParameterSetName': '--resource-group --virtual-machine-scale-set-name --debug' cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.55.0 (DEB) (AAZ) azsdk-python-core/1.26.0 Python/3.11.5 (Linux-6.2.0-1018-azure-x86_64-with-glibc2.35)' 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/2aa714e3-5fa4-45b2-9e3f-88f8eb04588c/resourceGroups/kubernetes-the-hard-way/providers/microsoft.Compute/virtualMachineScaleSets/worker-vmss/networkInterfaces?api-version=2016-03-30 HTTP/1.1" 404 261 cli.azure.cli.core.sdk.policies: Response status: 404 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': '261' 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': 'ad981e4b-e709-4c44-9aed-fd03511bd006' cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': 'c48dfc13-c87d-405b-bb9e-3f920f5e1a6a' cli.azure.cli.core.sdk.policies: 'x-ms-arm-service-request-id': 'a5471db4-47b4-4c2d-986b-ab000fd7445f' cli.azure.cli.core.sdk.policies: 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains' cli.azure.cli.core.sdk.policies: 'Server': 'Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0' cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-reads': '11999' cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'EASTASIA:20231218T064257Z:c48dfc13-c87d-405b-bb9e-3f920f5e1a6a' cli.azure.cli.core.sdk.policies: 'X-Content-Type-Options': 'nosniff' cli.azure.cli.core.sdk.policies: 'Date': 'Mon, 18 Dec 2023 06:42:56 GMT' cli.azure.cli.core.sdk.policies: Response content: cli.azure.cli.core.sdk.policies: { "error": { "code": "NotFound", "message": "Resource /subscriptions/2aa714e3-5fa4-45b2-9e3f-88f8eb04588c/resourceGroups/kubernetes-the-hard-way/providers/Microsoft.Compute/virtualMachineScaleSets/worker-vmss not found.", "details": [] } } cli.azure.cli.core.azclierror: Traceback (most recent call last): File "/opt/az/lib/python3.11/site-packages/knack/cli.py", line 233, in invoke cmd_result = self.invocation.execute(args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/az/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 663, in execute raise ex File "/opt/az/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 726, in _run_jobs_serially results.append(self._run_job(expanded_arg, cmd_copy)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/az/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 710, in _run_job result = list(result) ^^^^^^^^^^^^ File "/opt/az/lib/python3.11/site-packages/azure/cli/core/aaz/_paging.py", line 87, in next return next(self._page_iterator) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/az/lib/python3.11/site-packages/azure/cli/core/aaz/_paging.py", line 43, in next self._executor(self._next_link) File "/opt/az/lib/python3.11/site-packages/azure/cli/core/aaz/_command.py", line 250, in executor_wrapper executor() File "/opt/az/lib/python3.11/site-packages/azure/cli/command_modules/vm/aaz/latest/vmss/nic/_list.py", line 56, in _execute_operations self.NetworkInterfacesListVirtualMachineScaleSetNetworkInterfaces(ctx=self.ctx)() File "/opt/az/lib/python3.11/site-packages/azure/cli/command_modules/vm/aaz/latest/vmss/nic/_list.py", line 81, in call return self.on_error(session.http_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/az/lib/python3.11/site-packages/azure/cli/core/aaz/_operation.py", line 329, in on_error raise error_type(response=response) azure.core.exceptions.ResourceNotFoundError: (NotFound) Resource /subscriptions/2aa714e3-5fa4-45b2-9e3f-88f8eb04588c/resourceGroups/kubernetes-the-hard-way/providers/Microsoft.Compute/virtualMachineScaleSets/worker-vmss not found. Code: NotFound Message: Resource /subscriptions/2aa714e3-5fa4-45b2-9e3f-88f8eb04588c/resourceGroups/kubernetes-the-hard-way/providers/Microsoft.Compute/virtualMachineScaleSets/worker-vmss not found.

cli.azure.cli.core.azclierror: (NotFound) Resource /subscriptions/2aa714e3-5fa4-45b2-9e3f-88f8eb04588c/resourceGroups/kubernetes-the-hard-way/providers/Microsoft.Compute/virtualMachineScaleSets/worker-vmss not found. Code: NotFound Message: Resource /subscriptions/2aa714e3-5fa4-45b2-9e3f-88f8eb04588c/resourceGroups/kubernetes-the-hard-way/providers/Microsoft.Compute/virtualMachineScaleSets/worker-vmss not found. az_command_data_logger: (NotFound) Resource /subscriptions/2aa714e3-5fa4-45b2-9e3f-88f8eb04588c/resourceGroups/kubernetes-the-hard-way/providers/Microsoft.Compute/virtualMachineScaleSets/worker-vmss not found. Code: NotFound Message: Resource /subscriptions/2aa714e3-5fa4-45b2-9e3f-88f8eb04588c/resourceGroups/kubernetes-the-hard-way/providers/Microsoft.Compute/virtualMachineScaleSets/worker-vmss not found. cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7f14b7bbcea0>] az_command_data_logger: exit code: 3 cli.main: Command ran in 1.156 seconds (init: 0.149, invoke: 1.007) 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 3902 in cache telemetry.main: Begin creating telemetry upload process. telemetry.process: Creating upload process: "/opt/az/bin/python3 /opt/az/lib/python3.11/site-packages/azure/cli/telemetry/init.py /home/hsunwen/.azure" telemetry.process: Return from creating process telemetry.main: Finish creating telemetry upload process.****

Expected behavior

az vmss nic list --resource-group kubernetes-the-hard-way --virtual-machine-scale-set-name worker-vmss --debug

Should use newer api-version

Environment Summary

{ "azure-cli": "2.55.0", "azure-cli-core": "2.55.0", "azure-cli-telemetry": "1.1.0", "extensions": {} }

Additional context

No response

yonzhan commented 9 months ago

Thank you for opening this issue, we will look into it.

hsunhsunwenfang commented 9 months ago

This issue is causing "az vmss nic list " to falsely return 404

hsunhsunwenfang commented 8 months ago

Hi ppl, Are we expecting a fix on this in new az-cli?

yanzhudd commented 8 months ago

Hi @hsunhsunwenfang, yes, we'll fix it in the next sprint and release on 02-06.