Skip to content

Conversation

@FumingZhang
Copy link
Member

@FumingZhang FumingZhang commented Mar 22, 2023


This checklist is used to make sure that common guidelines for a pull request are followed.

In version 2.46.0 of azure-cli, due to the update of the API used by the role assignment-related operations, when the role assignment already exists, the returned error message is changed, and the code that previously performed this type of error checking can no longer handle such error, so that the command finally raise an error similar to Cannot create a role assignment for xxx....

The error message of adding exiting role assignment is (sending request with API version 2022-04-01)

(RoleAssignmentExists) The role assignment already exists.
Code: RoleAssignmentExists
Message: The role assignment already exists.

Previously the error message is (sending request with API version 2020-04-01-preview)

The role assignment already exists.
  • A simple and recommended workaround is to use azure-cli of version 2.45.0.
  • A complex workaround is to run the command (az aks update) with an extra option --verbose and check if the error is caused by role assignment already exists, if so, please ignore the error as cluster should have been updated successfully.

This issue should only occur in version 2.46.0, and the fix will be released in 2.47.0 (available since 04/04). Having aks-preview installed or not won't mitigate the problem.

Sync change from PR #25908.

Related command

az aks update

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally?

For new extensions:

About Extension Publish

There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update src/index.json automatically.
You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify src/index.json.

@ghost ghost requested review from yanzhudd and zhoxing-ms March 22, 2023 07:00
@ghost ghost assigned zhoxing-ms Mar 22, 2023
@ghost ghost added the Auto-Assign Auto assign by bot label Mar 22, 2023
@ghost ghost requested a review from yonzhan March 22, 2023 07:00
@ghost ghost added the AKS label Mar 22, 2023
@FumingZhang FumingZhang marked this pull request as draft March 22, 2023 07:14
@yonzhan
Copy link
Collaborator

yonzhan commented Mar 22, 2023

AKS

@FumingZhang FumingZhang force-pushed the fuming/fix-role-existing-0321 branch from 12528b7 to 34e8ecd Compare March 24, 2023 04:32
@FumingZhang FumingZhang marked this pull request as ready for review March 24, 2023 05:36
@zhoxing-ms zhoxing-ms merged commit c5505c6 into Azure:main Mar 26, 2023
@FumingZhang FumingZhang deleted the fuming/fix-role-existing-0321 branch April 10, 2023 02:07
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants