-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
ManagedCluster' object has no attribute 'upgrade_settings' #27525
Comments
Thank you for opening this issue, we will look into it. |
+@FumingZhang @wenjungaogaogao to take a look |
Hello @ionutleca, could you check your aks-preview extension version? $ az version Please try update the extension version and let us know if the issue is still there. Thanks! |
Hi, @wenjungaogaogao, I tested with "aks-preview": "0.5.161" and it does seem to work. Thank you! |
@wenjungaogaogao I actually somewhat disagree with this being closed. az-cli should be made more robust and handle version inconsistencies in a more robust way (instead of "crashing" like in this case it should tell the customer what is going on). |
And apparently this was not the first occurrence of such problem https://medium.com/@maciej.skorupka/azure-and-a-problem-with-az-cli-with-aks-preview-extension-583bc5ac55d4 |
@mmrazik, I am the one that closed this because I found the fix for it. But I agree that it's not an ideal behaviour, version incompatibility between the core cli and it's extensions shouldn't be detected by users trying things out. I'll reopen this and let the azure-cli team handle it. |
Describe the bug
az aks update --name ** --resource-group ** --api-server-authorized-ip-ranges **
fails with az cli 2.53.0:Related command
az aks update --name ** --resource-group ** --api-server-authorized-ip-ranges **
Errors
ERROR: 'ManagedCluster' object has no attribute 'upgrade_settings'
Issue script & Debug output
WARNING: The behavior of this command has been altered by the following extension: aks-preview
ERROR: The command failed with an unexpected error. Here is the traceback:
ERROR: 'ManagedCluster' object has no attribute 'upgrade_settings'
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 "/opt/az/azcliextensions/aks-preview/azext_aks_preview/custom.py", line 832, in aks_update
mc = aks_update_decorator.update_mc_profile_preview()
File "/opt/az/azcliextensions/aks-preview/azext_aks_preview/managed_cluster_decorator.py", line 3198, in update_mc_profile_preview
mc = self.update_mc_profile_default()
File "/opt/az/lib/python3.10/site-packages/azure/cli/command_modules/acs/managed_cluster_decorator.py", line 7336, in update_mc_profile_default
mc = self.update_upgrade_settings(mc)
File "/opt/az/lib/python3.10/site-packages/azure/cli/command_modules/acs/managed_cluster_decorator.py", line 6458, in update_upgrade_settings
if mc.upgrade_settings is not None and mc.upgrade_settings.override_settings is not None and mc.upgrade_settings.override_settings.until is not None:
AttributeError: 'ManagedCluster' object has no attribute 'upgrade_settings'
Expected behavior
No error, it was working in az cli 2.52.0.
Environment Summary
azure-cli 2.53.0
core 2.53.0
telemetry 1.1.0
Extensions:
azure-devops 0.26.0
Dependencies:
msal 1.24.0b2
azure-mgmt-resource 23.1.0b2
Additional context
No response
The text was updated successfully, but these errors were encountered: