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 iot ops check - the command failed with an unexpected error. #30324

Open
nassiharel opened this issue Nov 12, 2024 · 2 comments
Open

az iot ops check - the command failed with an unexpected error. #30324

nassiharel opened this issue Nov 12, 2024 · 2 comments
Labels
Auto-Assign Auto assign by bot bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization. IoT/CLI IoT Service Attention This issue is responsible by Azure service team. Similar-Issue

Comments

@nassiharel
Copy link

Describe the bug

I get an error when running

az iot ops check

Related command

az iot ops check

Errors

Command group 'iot ops' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
The command failed with an unexpected error. Here is the traceback:
'serviceName'
Traceback (most recent call last):
  File "/opt/az/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 666, in execute
    raise ex
  File "/opt/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 "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 703, in _run_job
    result = cmd_copy(params)
             ^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 336, in __call__
    return self.handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
    return op(**command_args)
           ^^^^^^^^^^^^^^^^^^
  File "/home/azureuser/.azure/cliextensions/azure-iot-ops/azext_edge/edge/commands_edge.py", line 87, in check
    return run_checks(
           ^^^^^^^^^^^
  File "/home/azureuser/.azure/cliextensions/azure-iot-ops/azext_edge/edge/providers/checks.py", line 69, in run_checks
    service_result = service_check_dict[ops_service](
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/azureuser/.azure/cliextensions/azure-iot-ops/azext_edge/edge/providers/check/summary.py", line 76, in check_summary
    result = check.check_func(
             ^^^^^^^^^^^^^^^^^
  File "/home/azureuser/.azure/cliextensions/azure-iot-ops/azext_edge/edge/providers/check/mq.py", line 61, in check_mq_deployment
    return check_post_deployment(
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/azureuser/.azure/cliextensions/azure-iot-ops/azext_edge/edge/providers/check/base/deployment.py", line 80, in check_post_deployment
    results.append(evaluate_func(detail_level=detail_level, as_list=as_list, resource_name=resource_name))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/azureuser/.azure/cliextensions/azure-iot-ops/azext_edge/edge/providers/check/mq.py", line 146, in evaluate_broker_listeners
    listener_spec_service_name: str = listener_spec["serviceName"]
                                      ~~~~~~~~~~~~~^^^^^^^^^^^^^^^
KeyError: 'serviceName'

Issue script & Debug output

sensitive data

Expected behavior

should run iot checks

Environment Summary

azure-cli 2.66.0

core 2.66.0
telemetry 1.1.0

Extensions:
azure-iot-ops 0.8.0b1
connectedk8s 1.10.1
customlocation 0.1.3
k8s-extension 1.6.2

Dependencies:
msal 1.31.0
azure-mgmt-resource 23.1.1

Python location '/opt/az/bin/python3'
Extensions directory '/home/azureuser/.azure/cliextensions'
Python (Linux) 3.12.7 (main, Oct 30 2024, 03:56:40) [GCC 11.4.0]
Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

Additional context

No response

@nassiharel nassiharel added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Nov 12, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. IoT Service Attention This issue is responsible by Azure service team. Auto-Assign Auto assign by bot labels Nov 12, 2024
@yonzhan
Copy link
Collaborator

yonzhan commented Nov 12, 2024

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

Copy link

Here are some similar issues that might help you. Please check if they can solve your problem.

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 bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization. IoT/CLI IoT Service Attention This issue is responsible by Azure service team. Similar-Issue
Projects
None yet
Development

No branches or pull requests

2 participants