Azure / azure-cli-extensions

Public Repository for Extensions of Azure CLI.
https://docs.microsoft.com/en-us/cli/azure
MIT License
381 stars 1.2k forks source link

The idempotency for "az aks create" command is broken #6131

Open vlardn opened 1 year ago

vlardn commented 1 year ago

Related command

az aks create

Extension name

aks-preview

Description of the issue

The "az aks create" command idempotency worked perfectly until last week when this pull request was merged. Since this time the 2nd, 3rd, etc. run for "az aks create" always gives the error: The cluster 'NAME' under resource group 'NAME' already exists. Please use command 'az aks update' to update the existing cluster ...

Background: Almost all "az create/set"commands are idempotent. This is because idempotency greatly simplifies scripting: i.e. if some big Azure resource-creating script fails you can rerun and it will skip existing resources and continue to create the remaining ones:

"This is a very useful property in many situations, as it means that an operation can be repeated or retried as often as necessary without causing unintended effects. With non-idempotent operations, the algorithm may have to keep track of whether the operation was already performed or not." - Idempotence, Wikipedia

In fact, there were a lot of idempotency fixes for other az commands like "az keyvault create", "az bot create", etc. - you can search for the word "idempotent" in Azure CLI release notes.


azure-cli - 2.46.0 k8s-extension - 1.4.0 aks-preview - 0.5.133

yonzhan commented 1 year ago

Thank you for opening this issue, we will look into it.

yonzhan commented 1 year ago

route to CXP team

ghost commented 1 year ago

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

Issue Details
### Related command az aks create ### Extension name aks-preview ### Description of the issue The "az aks create" command idempotency worked perfectly until last week when [this pull request](https://github.com/Azure/azure-cli-extensions/pull/5999) was merged. Since this time the 2nd, 3rd, etc. run for "az aks create" always gives the error: `The cluster 'NAME' under resource group 'NAME' already exists. Please use command 'az aks update' to update the existing cluster ...` **Background**: Almost all "az create/set"commands are idempotent. This is because idempotency greatly simplifies scripting: i.e. if some big Azure resource-creating script fails you can rerun and it will skip existing resources and continue to create the remaining ones: > "This is a very useful property in many situations, as it means that an operation can be repeated or retried as often as necessary without causing unintended effects. With non-idempotent operations, the algorithm may have to keep track of whether the operation was already performed or not." - [Idempotence, Wikipedia](https://en.wikipedia.org/wiki/Idempotence) In fact, there were a lot of idempotency fixes for other az commands like "az keyvault create", "az bot create", etc. - you can search for the word "idempotent" in [Azure CLI release notes](https://learn.microsoft.com/en-us/cli/azure/release-notes-azure-cli). ----- azure-cli - 2.46.0 k8s-extension - 1.4.0 aks-preview - 0.5.133
Author: vlardn
Assignees: -
Labels: `question`, `customer-reported`, `AKS`, `Service Attention`, `Auto-Assign`, `Test`
Milestone: Backlog
navba-MSFT commented 1 year ago

Adding Service team to look into this.

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

illrill commented 1 year ago

+1

adamrushuk commented 1 year ago

Has there been any investigation on this?

Idempotency is the main reason I use Az CLI over Azure PowerShell, so it would be great if this could be fixed, to return the previous functionality 🙏🏼

adlangx commented 1 year ago

Any updates?

bevan-criticalarc commented 1 month ago

How is this still broken after 1.5 years?