Azure / Azure/azure-cli

az aks update --resource-group <rg_name> --name <name> --auto-upgrade-channel patch fails

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

Description

### Describe the bug

Same as title.

### Related command

az aks update --resource-group --name --auto-upgrade-channel patch

### Errors

Could not find service principal or user assigned MSI for roleassignment
The command failed with an unexpected error. Here is the traceback:
'NoneType' object has no attribute 'rpartition'
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 701, in _run_job
result = cmd_copy(params)
^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/commands/__init__.py", line 334, in __call__
return self.handler(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/cli/command_modules/acs/custom.py", line 808, in aks_update
return aks_update_decorator.update_mc(mc)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/cli/command_modules/acs/managed_cluster_decorator.py", line 8689, in update_mc
return self.put_mc(mc)
^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/cli/command_modules/acs/managed_cluster_decorator.py", line 8670, in put_mc
self.postprocessing_after_mc_created(cluster)
File "/opt/az/lib/python3.11/site-packages/azure/cli/command_modules/acs/managed_cluster_decorator.py", line 8500, in postprocessing_after_mc_created
self.context.external_functions.add_virtual_node_role_assignment(
File "/opt/az/lib/python3.11/site-packages/azure/cli/command_modules/acs/addonconfiguration.py", line 953, in add_virtual_node_role_assignment
vnet_id = vnet_subnet_id.rpartition("/")[0]
^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'rpartition'
To check existing issues, please visit: https://github.com/Azure/azure-cli/issues

### Issue script & Debug output

Can't paste ( too long )

### Expected behavior

https://learn.microsoft.com/en-us/azure/aks/tutorial-kubernetes-upgrade-cluster?tabs=azure-cli#configure-automatic-cluster-upgrades

### Environment Summary

azure-cli 2.61.0

core 2.61.0
telemetry 1.1.0

Dependencies:
msal 1.28.0
azure-mgmt-resource 23.1.1

Python location '/opt/az/bin/python3'
Extensions directory '/home/jonathan/.azure/cliextensions'

Python (Linux) 3.11.8 (main, May 16 2024, 03:47:28) [GCC 11.4.0]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

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