Azure / Azure/azure-cli

ManagedCluster' object has no attribute 'upgrade_settings'

Open
#27,525 7 comments 2 reactions 0 assignees View on GitHub
act-observability-squad AKS Auto-Assign bug customer-reported Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### Describe the bug

`az aks update --name ** --resource-group ** --api-server-authorized-ip-ranges **` fails with az cli 2.53.0:
```
...
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'
```

### 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_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.