Open ryanjcanning opened 7 months ago
Thank you for opening this issue, we will look into it.
Hi All, how did it break suddenly ? It doesn't seem to be working for az version 2.55 either.. this is a blocker..
$ az connectedmachine list -g
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 663, in execute
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 726, in _run_jobs_serially
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 710, in _run_job
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_paging.py", line 87, in next
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_paging.py", line 43, in next
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_command.py", line 250, in executor_wrapper
File "C:\Users\sb0601.azure\cliextensions\connectedmachine\azext_connectedmachine\aaz\latest\connectedmachine_list.py", line 58, in _execute_operations
self.MachinesListByResourceGroup(ctx=self.ctx)()
File "C:\Users\sb0601.azure\cliextensions\connectedmachine\azext_connectedmachine\aaz\latest\connectedmachine_list.py", line 81, in call
return self.on_200(session)
^^^^^^^^^^^^^^^^^^^^
File "C:\Users\sb0601.azure\cliextensions\connectedmachine\azext_connectedmachine\aaz\latest\connectedmachine_list.py", line 138, in on_200
self.ctx.set_var(
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_command_ctx.py", line 84, in set_var
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_field_value.py", line 76, in setitem
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_field_type.py", line 234, in process_data
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_field_value.py", line 76, in setitem
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_field_type.py", line 409, in process_data
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_field_value.py", line 363, in setitem
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_field_type.py", line 234, in process_data
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_field_value.py", line 76, in setitem
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_field_type.py", line 234, in process_data
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_field_value.py", line 76, in setitem
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_field_type.py", line 234, in process_data
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_field_value.py", line 76, in setitem
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_field_type.py", line 48, in process_data
azure.cli.core.aaz.exceptions.AAZInvalidValueError: Expect <class 'str'>, got -1 (<class 'int'>)
To check existing issues, please visit: https://github.com/Azure/azure-cli/issues
$ az version { "azure-cli": "2.55.0", "azure-cli-core": "2.55.0", "azure-cli-telemetry": "1.1.0", "extensions": { "connectedk8s": "1.6.4", "connectedmachine": "0.7.0", "k8s-extension": "1.6.0", "managednetworkfabric": "4.2.0", "networkcloud": "2.0.0b2", "ssh": "2.0.2" } }
Luckily this one worked.. but sudden demise of az connectedmachine went unwarranted..
$ az resource list -g
@ryanjcanning @sb1975 the issue was caused by a change made to license properties for Windows which inadvertently affected the cli for Linux machines. The issue has been fixed, can you try az connectedmachine
again and let me know if it works?
@vedkale Issue still exists for me, getting the same error as before.
I'm getting similar errors :
az connectedmachine list --resource-group "xxxxxxxxxxxxxxx"
The command failed with an unexpected error. Here is the traceback: Expect <class 'str'>, got 0 (<class 'int'>) Traceback (most recent call last): File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 663, in execute File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 726, in _run_jobs_serially File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 710, in _run_job File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_paging.py", line 87, in next File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_paging.py", line 43, in next File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_command.py", line 249, in executor_wrapper File "C:\Users\GregoryM.azure\cliextensions\connectedmachine\azext_connectedmachine\aaz\latest\connectedmachine_list.py", line 58, in _execute_operations self.MachinesListByResourceGroup(ctx=self.ctx)() File "C:\Users\GregoryM.azure\cliextensions\connectedmachine\azext_connectedmachine\aaz\latest\connectedmachine_list.py", line 81, in call return self.on_200(session) File "C:\Users\GregoryM.azure\cliextensions\connectedmachine\azext_connectedmachine\aaz\latest\connectedmachine_list.py", line 138, in on_200 self.ctx.set_var( File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_command_ctx.py", line 84, in set_var File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_field_value.py", line 76, in setitem File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_field_type.py", line 234, in process_data File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_field_value.py", line 76, in setitem File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_field_type.py", line 409, in process_data File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_field_value.py", line 363, in setitem File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_field_type.py", line 234, in process_data File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_field_value.py", line 76, in setitem File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_field_type.py", line 234, in process_data File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_field_value.py", line 76, in setitem File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_field_type.py", line 234, in process_data File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_field_value.py", line 76, in setitem File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_field_type.py", line 234, in process_data File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_field_value.py", line 76, in setitem File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_field_type.py", line 409, in process_data File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_field_value.py", line 363, in setitem File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_field_type.py", line 234, in process_data File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_field_value.py", line 76, in setitem File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_field_type.py", line 48, in process_data azure.cli.core.aaz.exceptions.AAZInvalidValueError: Expect <class 'str'>, got 0 (<class 'int'>) To check existing issues, please visit: https://github.com/Azure/azure-cli/issues
$PSVersionTable
Name Value
PSVersion 7.4.1 PSEdition Core GitCommitId 7.4.1 OS Microsoft Windows 10.0.22621 Platform Win32NT PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…} PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 WSManStackVersion 3.0
az version { "azure-cli": "2.51.0", "azure-cli-core": "2.51.0", "azure-cli-telemetry": "1.1.0", "extensions": { "connectedmachine": "0.7.0", "ssh": "2.0.1" } }
Major Minor Build Revision
10 0 22621 0
The problem persists.
Example: `az connectedmachine list --resource-group rg-arc-servers-001 --output tsv The command failed with an unexpected error. Here is the traceback: Expect <class 'str'>, got 0 (<class 'int'>) 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 664, in execute raise ex File "/opt/az/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 731, 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 714, 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 "/home/skramole/.azure/cliextensions/connectedmachine/azext_connectedmachine/aaz/latest/connectedmachine/_list.py", line 58, in _execute_operations self.MachinesListByResourceGroup(ctx=self.ctx)() File "/home/skramole/.azure/cliextensions/connectedmachine/azext_connectedmachine/aaz/latest/connectedmachine/_list.py", line 81, in call return self.on_200(session) ^^^^^^^^^^^^^^^^^^^^ File "/home/skramole/.azure/cliextensions/connectedmachine/azext_connectedmachine/aaz/latest/connectedmachine/_list.py", line 138, in on_200 self.ctx.set_var( File "/opt/az/lib/python3.11/site-packages/azure/cli/core/aaz/_command_ctx.py", line 84, in set_var self.vars[name] = data
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/aaz/_field_value.py", line 76, in __setitem__
self._data[name] = attr_schema.process_data(data, key=name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/aaz/_field_type.py", line 234, in process_data
value[key] = sub_data
~~~~~^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/aaz/_field_value.py", line 76, in __setitem__
self._data[name] = attr_schema.process_data(data, key=name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/aaz/_field_type.py", line 409, in process_data
value[idx] = sub_data
~~~~~^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/aaz/_field_value.py", line 363, in __setitem__
self._data[idx] = item_schema.process_data(data, key=idx)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/aaz/_field_type.py", line 234, in process_data
value[key] = sub_data
~~~~~^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/aaz/_field_value.py", line 76, in __setitem__
self._data[name] = attr_schema.process_data(data, key=name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/aaz/_field_type.py", line 234, in process_data
value[key] = sub_data
~~~~~^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/aaz/_field_value.py", line 76, in __setitem__
self._data[name] = attr_schema.process_data(data, key=name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/aaz/_field_type.py", line 234, in process_data
value[key] = sub_data
~~~~~^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/aaz/_field_value.py", line 76, in __setitem__
self._data[name] = attr_schema.process_data(data, key=name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/aaz/_field_type.py", line 234, in process_data
value[key] = sub_data
~~~~~^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/aaz/_field_value.py", line 76, in __setitem__
self._data[name] = attr_schema.process_data(data, key=name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/aaz/_field_type.py", line 409, in process_data
value[idx] = sub_data
~~~~~^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/aaz/_field_value.py", line 363, in __setitem__
self._data[idx] = item_schema.process_data(data, key=idx)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/aaz/_field_type.py", line 234, in process_data
value[key] = sub_data
~~~~~^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/aaz/_field_value.py", line 76, in __setitem__
self._data[name] = attr_schema.process_data(data, key=name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/aaz/_field_type.py", line 48, in process_data
raise AAZInvalidValueError('Expect {}, got {} ({})'.format(self.DataType, data, type(data)))
azure.cli.core.aaz.exceptions.AAZInvalidValueError: Expect <class 'str'>, got 0 (<class 'int'>)`
**Azure Cli Version Info**
`az version
{
"azure-cli": "2.59.0",
"azure-cli-core": "2.59.0",
"azure-cli-telemetry": "1.1.0",
"extensions": {
"connectedmachine": "0.7.0"
}
}`
Describe the bug
When attempting to get a list of Azure Arc machines within a resource group (using the connectedmachine extension), it fails. Appears to work fine on resource groups with small amount of Arc machines, but RG's that have ~100+ it fails with error below. When running with --debug, it pulls a list but fails with nextlink property.
Related command
az connectedmachine list
Errors
Issue script & Debug output
Expected behavior
To provide a full list of Arc connected machines and properties such as:
Environment Summary
Additional context
No response