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 ssh arc issue #6655

Closed
mSalehsta opened this issue Aug 16, 2023 · 3 comments · Fixed by #6659
Closed

az ssh arc issue #6655

mSalehsta opened this issue Aug 16, 2023 · 3 comments · Fixed by #6659
Assignees
Labels
Auto-Assign Auto assign by bot customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention This issue is responsible by Azure service team. VM SSH

Comments

@mSalehsta
Copy link

Describe the bug

The command failed with an unexpected error. Here is the traceback:
cannot unpack non-iterable NoneType object
Traceback (most recent call last):
File "/opt/az/lib/python3.10/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/init.py", line 663, in execute
raise ex
File "/opt/az/lib/python3.10/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.10/site-packages/azure/cli/core/commands/init.py", line 697, in _run_job
result = cmd_copy(params)
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/init.py", line 333, in call
return self.handler(*args, **kwargs)
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
File "/root/.azure/cliextensions/ssh/azext_ssh/custom.py", line 151, in ssh_arc
ssh_vm(cmd, resource_group_name, vm_name, None, public_key_file, private_key_file,
File "/root/.azure/cliextensions/ssh/azext_ssh/custom.py", line 64, in ssh_vm
target_os_utils.handle_target_os_type(cmd, ssh_session)
File "/root/.azure/cliextensions/ssh/azext_ssh/target_os_utils.py", line 24, in handle_target_os_type
os_type, agent_version = _get_arc_server_os(cmd, op_info.resource_group_name, op_info.vm_name)
TypeError: cannot unpack non-iterable NoneType object

Related command

az ssh arc --subscription ########### --resource-group ########### --name ########### --local-user ########### --private-key-file /root/.ssh/id_rsa -- -o StrictHostKeyChecking=no 'MY-COMMAND'

Errors

The command failed with an unexpected error. Here is the traceback:
cannot unpack non-iterable NoneType object
Traceback (most recent call last):
File "/opt/az/lib/python3.10/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/init.py", line 663, in execute
raise ex
File "/opt/az/lib/python3.10/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.10/site-packages/azure/cli/core/commands/init.py", line 697, in _run_job
result = cmd_copy(params)
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/init.py", line 333, in call
return self.handler(*args, **kwargs)
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
File "/root/.azure/cliextensions/ssh/azext_ssh/custom.py", line 151, in ssh_arc
ssh_vm(cmd, resource_group_name, vm_name, None, public_key_file, private_key_file,
File "/root/.azure/cliextensions/ssh/azext_ssh/custom.py", line 64, in ssh_vm
target_os_utils.handle_target_os_type(cmd, ssh_session)
File "/root/.azure/cliextensions/ssh/azext_ssh/target_os_utils.py", line 24, in handle_target_os_type
os_type, agent_version = _get_arc_server_os(cmd, op_info.resource_group_name, op_info.vm_name)
TypeError: cannot unpack non-iterable NoneType object

Issue script & Debug output

The command failed with an unexpected error. Here is the traceback:
cannot unpack non-iterable NoneType object
Traceback (most recent call last):
File "/opt/az/lib/python3.10/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/init.py", line 663, in execute
raise ex
File "/opt/az/lib/python3.10/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.10/site-packages/azure/cli/core/commands/init.py", line 697, in _run_job
result = cmd_copy(params)
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/init.py", line 333, in call
return self.handler(*args, **kwargs)
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
File "/root/.azure/cliextensions/ssh/azext_ssh/custom.py", line 151, in ssh_arc
ssh_vm(cmd, resource_group_name, vm_name, None, public_key_file, private_key_file,
File "/root/.azure/cliextensions/ssh/azext_ssh/custom.py", line 64, in ssh_vm
target_os_utils.handle_target_os_type(cmd, ssh_session)
File "/root/.azure/cliextensions/ssh/azext_ssh/target_os_utils.py", line 24, in handle_target_os_type
os_type, agent_version = _get_arc_server_os(cmd, op_info.resource_group_name, op_info.vm_name)
TypeError: cannot unpack non-iterable NoneType object

Expected behavior

Complete the commands successfully

Environment Summary

azure-cli 2.51.0

core 2.51.0
telemetry 1.1.0

Extensions:
ssh 2.0.1

Dependencies:
msal 1.24.0b1
azure-mgmt-resource 23.1.0b2

Additional context

No response

@mSalehsta mSalehsta added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Aug 16, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added question The issue doesn't require a change to the product in order to be resolved. Most issues start as that customer-reported Issues that are reported by GitHub users external to the Azure organization. Auto-Assign Auto assign by bot VM SSH CXP Attention This issue is handled by CXP team. labels Aug 16, 2023
@yonzhan
Copy link
Collaborator

yonzhan commented Aug 16, 2023

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

@yonzhan yonzhan removed the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Aug 16, 2023
@jsntcy jsntcy added the Service Attention This issue is responsible by Azure service team. label Aug 17, 2023
@jsntcy
Copy link
Member

jsntcy commented Aug 17, 2023

@vthiebaut10, could you please take a look?

@vthiebaut10
Copy link
Contributor

@mSalehsta Thank you for reporting this bug. I opened a PR to fix this bug.

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 customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention This issue is responsible by Azure service team. VM SSH
Projects
None yet
4 participants