azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

Regression in az aks create version 2.46.0 when the role assignment already exists

Open jaslawinMs opened this issue 2 years ago • 8 comments

Related command

jaslawinMs avatar Mar 16 '23 23:03 jaslawinMs

route to CXP team

yonzhan avatar Mar 17 '23 00:03 yonzhan

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Azure/aks-pm.

Issue Details

Related command

Author: jaslawinMs
Assignees: -
Labels:

Service Attention, AKS, needs-team-attention, Auto-Assign

Milestone: Backlog

ghost avatar Mar 17 '23 03:03 ghost

Since this is a non-customer reported issue, adding Service team to look into this.

navba-MSFT avatar Mar 17 '23 03:03 navba-MSFT

@Azure/aks-pm Could you please look into this once you get a chance ? Thanks in advance.

navba-MSFT avatar Mar 17 '23 03:03 navba-MSFT

FYI: az aks update --name *** --resource-group *** --attach-acr *** suddenly fails with 2.46.0 error Could not create a role assignment for ACR. Are you an Owner on this subscription? even if the user executing the command is a subscription owner.

codepic avatar Mar 17 '23 09:03 codepic

Any workarounds for this?

john-vainio avatar Mar 29 '23 19:03 john-vainio

Any workarounds for this?

Just use previous version until a new one is fixed. For Github actions with ubuntu runners, the following works:

name: "az-cli"
description: "install azure cli"

inputs:
  AZ_VERSION:
    description: "Version of azure cli to use"
    required: false

runs:
  using: composite
  steps:
    - shell: bash
      run: |
        sudo apt-get update
        sudo apt-get -y install ca-certificates curl apt-transport-https lsb-release gnupg
        sudo mkdir -p /etc/apt/keyrings
        curl -sLS https://packages.microsoft.com/keys/microsoft.asc |
            gpg --dearmor |
            sudo tee /etc/apt/keyrings/microsoft.gpg > /dev/null
        sudo chmod go+r /etc/apt/keyrings/microsoft.gpg
        AZ_REPO=$(lsb_release -cs)
        echo "deb [arch=`dpkg --print-architecture` signed-by=/etc/apt/keyrings/microsoft.gpg] https://packages.microsoft.com/repos/azure-cli/ $AZ_REPO main" |
            sudo tee /etc/apt/sources.list.d/azure-cli.list
        sudo apt-get update
        sudo apt-get -y --allow-downgrades install azure-cli=${{ inputs.AZ_VERSION }}-1~$(lsb_release -cs)

For the rest of the world, refer to the documentation

codepic avatar Apr 11 '23 09:04 codepic

@codepic @jaslawinMs Checking in on this issue. Do you know if this regression still occurring in the latest version?

mbifeld avatar Dec 12 '25 16:12 mbifeld