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

az vm install-patches gives error regarding --kb-numbers-to-include and --exclude-kbs-requiring-reboot #30009

Open
Dxaz opened this issue Sep 30, 2024 · 1 comment · May be fixed by #30011
Open
Assignees
Labels
Auto-Assign Auto assign by bot Azure CLI Team The command of the issue is owned by Azure CLI team Compute az vm/vmss/image/disk/snapshot question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone

Comments

@Dxaz
Copy link

Dxaz commented Sep 30, 2024

Describe the bug

az vm install-patches when ran gives an error when ran regarding some parameters passed to the install_patches function.

Related command

az vm install-patches

Errors

kb_numbers_to_inclunde is not a known attribute of class <class 'azure.mgmt.compute.v2024_07_01.models._models_py3.WindowsParameters'> and will be ignored

exclude_kbs_requirig_reboot is not a known attribute of class <class 'azure.mgmt.compute.v2024_07_01.models._models_py3.WindowsParameters'> and will be ignored

Issue script & Debug output

$ az vm install-patches --resource-group myResourceGroup--name myVM --maximum-duration PT4H --reboot-setting IfRequired --debug
cli.knack.cli: Command arguments: ['vm', 'install-patches', '--resource-group', 'Repo', '--name', 'myVM', '--maximum-duration', 'PT4H', '--reboot-setting', 'IfRequired', '--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 0x7fdb950c7f60>, <function OutputProducer.on_global_arguments at 0x7fdb95076160>, <function CLIQuery.on_global_arguments at 0x7fdb950b3c40>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'vm': ['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.308 58 247
cli.azure.cli.core: Total (1) 0.308 58 247
cli.azure.cli.core: Loaded 58 groups, 247 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : vm install-patches
cli.azure.cli.core: Command table: vm install-patches
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7fdb94351d00>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/home/gregdiaz/.azure/commands/2024-09-30.16-11-30.vm_install-patches.20503.log'.
az_command_data_logger: command args: vm install-patches --resource-group {} --name {} --maximum-duration {} --reboot-setting {} --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x7fdb9438c4a0>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x7fdb9419e3e0>, <function register_cache_arguments..add_cache_arguments at 0x7fdb9419e520>, <function register_upcoming_breaking_change_info..update_breaking_change_info at 0x7fdb9419e5c0>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x7fdb95076200>, <function CLIQuery.handle_query_parameter at 0x7fdb950b3ce0>, <function register_ids_argument..parse_ids_arguments at 0x7fdb9419e480>]
cli.azure.cli.core.commands.client_factory: Getting management service client client_type=ComputeManagementClient
cli.azure.cli.core.auth.persistence: build_persistence: location='/home/gregdiaz/.azure/msal_token_cache.json', encrypt=False
cli.azure.cli.core.auth.binary_cache: load: /home/gregdiaz/.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/16b3c013-d300-468d-ac64-7eda0820b6d3
msal.authority: openid_config("https://login.microsoftonline.com/16b3c013-d300-468d-ac64-7eda0820b6d3/v2.0/.well-known/openid-configuration") = {'token_endpoint': 'https://login.microsoftonline.com/16b3c013-d300-468d-ac64-7eda0820b6d3/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/16b3c013-d300-468d-ac64-7eda0820b6d3/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/16b3c013-d300-468d-ac64-7eda0820b6d3/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/16b3c013-d300-468d-ac64-7eda0820b6d3/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/16b3c013-d300-468d-ac64-7eda0820b6d3/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/16b3c013-d300-468d-ac64-7eda0820b6d3/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/16b3c013-d300-468d-ac64-7eda0820b6d3/kerberos', 'tenant_region_scope': 'NA', '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
azure.mgmt.compute._serialization: kb_numbers_to_inclunde is not a known attribute of class <class 'azure.mgmt.compute.v2024_07_01.models._models_py3.WindowsParameters'> and will be ignored
azure.mgmt.compute._serialization: exclude_kbs_requirig_reboot is not a known attribute of class <class 'azure.mgmt.compute.v2024_07_01.models._models_py3.WindowsParameters'> and will be ignored
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: c39d36d1-8c48-40cb-880e-7435e0097045
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/2a72a829-1f74-4dec-a113-e4b5ba752f57/resourceGroups/Repo/providers/Microsoft.Compute/virtualMachines/myVM/installPatches?api-version=2024-07-01'
cli.azure.cli.core.sdk.policies: Request method: 'POST'
cli.azure.cli.core.sdk.policies: Request headers:
cli.azure.cli.core.sdk.policies: 'Content-Type': 'application/json'
cli.azure.cli.core.sdk.policies: 'Content-Length': '106'
cli.azure.cli.core.sdk.policies: 'Accept': 'application/json'
cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': '904e59f1-7f70-11ef-9cd6-45b2441b0926'
cli.azure.cli.core.sdk.policies: 'CommandName': 'vm install-patches'
cli.azure.cli.core.sdk.policies: 'ParameterSetName': '--resource-group --name --maximum-duration --reboot-setting --debug'
cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.64.0 (DEB) azsdk-python-core/1.28.0 Python/3.11.8 (Linux-5.15.153.1-microsoft-standard-WSL2-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: {"maximumDuration": "PT4H", "rebootSetting": "IfRequired", "windowsParameters": {}, "linuxParameters": {}}
urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443
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 666, in execute
raise ex
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 733, 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 703, in _run_job
result = cmd_copy(params)
^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 336, in call
return self.handler(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/cli/command_modules/vm/custom.py", line 5389, in install_vm_patches
return sdk_no_wait(no_wait, client.begin_install_patches, resource_group_name=resource_group_name, vm_name=vm_name, install_patches_input=install_patches_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/util.py", line 710, in sdk_no_wait
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/core/tracing/decorator.py", line 76, in wrapper_use_tracer
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/mgmt/compute/v2024_07_01/operations/_operations.py", line 17803, in begin_install_patches
raw_result = self._install_patches_initial(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/mgmt/compute/v2024_07_01/operations/_operations.py", line 17689, in _install_patches_initial
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/core/pipeline/_base.py", line 213, in run
return first_node.send(pipeline_request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/core/pipeline/_base.py", line 70, in send
response = self.next.send(request)
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/core/pipeline/_base.py", line 70, in send
response = self.next.send(request)
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/core/pipeline/_base.py", line 70, in send
response = self.next.send(request)
^^^^^^^^^^^^^^^^^^^^^^^
[Previous line repeated 2 more times]
File "/opt/az/lib/python3.11/site-packages/azure/mgmt/core/policies/_base.py", line 47, in send
response = self.next.send(request)
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/core/pipeline/policies/_redirect.py", line 181, in send
response = self.next.send(request)
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/core/pipeline/policies/_retry.py", line 489, in send
raise err
File "/opt/az/lib/python3.11/site-packages/azure/core/pipeline/policies/_retry.py", line 467, in send
response = self.next.send(request)
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/core/pipeline/policies/_authentication.py", line 115, in send
response = self.next.send(request)
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/core/pipeline/_base.py", line 70, in send
response = self.next.send(request)
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/core/pipeline/_base.py", line 70, in send
response = self.next.send(request)
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/core/pipeline/_base.py", line 70, in send
response = self.next.send(request)
^^^^^^^^^^^^^^^^^^^^^^^
[Previous line repeated 2 more times]
File "/opt/az/lib/python3.11/site-packages/azure/core/pipeline/_base.py", line 108, in send
self._sender.send(request.http_request, **request.context.options),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/core/pipeline/transport/_requests_basic.py", line 376, in send
raise error
azure.core.exceptions.ServiceRequestError: <urllib3.connection.HTTPSConnection object at 0x7fdb92786b50>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution

cli.azure.cli.core.azclierror: <urllib3.connection.HTTPSConnection object at 0x7fdb92786b50>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution
az_command_data_logger: <urllib3.connection.HTTPSConnection object at 0x7fdb92786b50>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7fdb94351f80>]
az_command_data_logger: exit code: 1
cli.main: Command ran in 11.953 seconds (init: 0.174, invoke: 11.779)
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 4048 in cache file under /home/gregdiaz/.azure/telemetry/20240930161142499
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/gregdiaz/.azure /home/gregdiaz/.azure/telemetry/20240930161142499"
telemetry.process: Return from creating process 20555
telemetry.main: Finish creating telemetry upload process.

Expected behavior

should not be throwing an error.az

Environment Summary

az --version
azure-cli 2.64.0

core 2.64.0
telemetry 1.1.0

Dependencies:
msal 1.30.0
azure-mgmt-resource 23.1.1

Python location '/opt/az/bin/python3'
Extensions directory '/home/gregdiaz/.azure/cliextensions'

Python (Linux) 3.11.8 (main, Aug 28 2024, 05:45:18) [GCC 11.4.0]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

Additional context

No response

@Dxaz Dxaz added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Sep 30, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Compute az vm/vmss/image/disk/snapshot label Sep 30, 2024
@yonzhan
Copy link
Collaborator

yonzhan commented Sep 30, 2024

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

@microsoft-github-policy-service microsoft-github-policy-service bot added Auto-Assign Auto assign by bot Azure CLI Team The command of the issue is owned by Azure CLI team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Sep 30, 2024
@yonzhan yonzhan removed the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Sep 30, 2024
@yonzhan yonzhan added this to the Backlog milestone Sep 30, 2024
@Dxaz Dxaz changed the title az vm install-patches gives error regarding --kb-numbers-to-include and --exclude-kbs-requiring-reboot az vm install-patches gives error regarding --kb-numbers-to-include and --exclude-kbs-requiring-reboot Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot Azure CLI Team The command of the issue is owned by Azure CLI team Compute az vm/vmss/image/disk/snapshot question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
4 participants