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 aks mesh get-upgrades fails with a traceback if Istio AKS addon is disabled #7346

Closed
zioproto opened this issue Mar 4, 2024 · 4 comments
Assignees
Labels
AKS Auto-Assign Auto assign by bot bug This issue requires a change to an existing behavior in the product in order to be resolved. Service Attention This issue is responsible by Azure service team.

Comments

@zioproto
Copy link

zioproto commented Mar 4, 2024

Describe the bug

Calling az aks mesh get-upgrades -g my-rg --name my-aks fails with a traceback when the Istio AKS add-on is disabled.

Related command

Calling `az aks mesh get-upgrades -g my-rg --name my-aks

Errors

The command failed with an unexpected error. Here is the traceback:
'NoneType' object is not iterable
Traceback (most recent call last):
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/__init__.py", line 664, in execute
    raise ex
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/__init__.py", line 729, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/__init__.py", line 698, in _run_job
    result = cmd_copy(params)
             ^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/__init__.py", line 334, in __call__
    return self.handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
    return op(**command_args)
           ^^^^^^^^^^^^^^^^^^
  File "/Users/saverioproto/.azure/cliextensions/aks-preview/azext_aks_preview/custom.py", line 2907, in aks_mesh_get_upgrades
    for page in upgradeProfiles.by_page():
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/core/paging.py", line 83, in __next__
    self.continuation_token, self._current_page = self._extract_data(self._response)
                                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/saverioproto/.azure/cliextensions/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2023_10_02_preview/operations/_managed_clusters_operations.py", line 4442, in extract_data
    return deserialized.next_link or None, iter(list_of_elem)
                                           ^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable
To check existing issues, please visit:
https://github.com/Azure/azure-cli/issues

Issue script & Debug output

n/a

Expected behavior

It should fail or print an error without traceback.

Environment Summary

azure-cli 2.57.0

core 2.57.0
telemetry 1.1.0

Extensions:
account 0.2.5
aks-preview 1.0.0b5
alb 1.0.0
amg 1.2.9
containerapp 0.3.44
costmanagement 0.2.1
fleet 1.0.1
front-door 1.0.17
k8s-extension 1.6.0
monitor-control-service 0.4.1
rdbms-connect 1.0.4
serial-console 0.1.6

Dependencies:
msal 1.26.0
azure-mgmt-resource 23.1.0b2

Additional context

No response

@zioproto zioproto added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Mar 4, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added AKS Service Attention This issue is responsible by Azure service team. Auto-Assign Auto assign by bot labels Mar 4, 2024
@yonzhan
Copy link
Collaborator

yonzhan commented Mar 4, 2024

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

Copy link
Contributor

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @dyu1208, @FumingZhang, @andyliuliming.

@FumingZhang
Copy link
Member

The result returned by the server is not valid, should be an empty list instead of null.

@deveshdama will take a further look

@deveshdama
Copy link
Contributor

This fix has been released as part of extension aks-preview version 2.0.0b3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AKS Auto-Assign Auto assign by bot bug This issue requires a change to an existing behavior in the product in order to be resolved. Service Attention This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

4 participants