Skip to content

[AKS] az aks create/update: Fix handling for --container-storage-version parameter#32015

Merged
yanzhudd merged 2 commits intoAzure:devfrom
nearora-msft:nearora/acstorfixes
Sep 11, 2025
Merged

[AKS] az aks create/update: Fix handling for --container-storage-version parameter#32015
yanzhudd merged 2 commits intoAzure:devfrom
nearora-msft:nearora/acstorfixes

Conversation

@nearora-msft
Copy link
Contributor

Related command
az aks create
az aks update

Description

  1. This PR allows the user to set --container-storage-version parameter to '2'. This will follow the same steps as enabling azure container storage without --container-storage-version set to '2'. This is because '2' is the latest version.
  2. Throw validation errors if "--container-storage-version" parameter is set along with "--disable-azure-container-storage". Disable doesn't require a version parameter.

Testing Guide
az aks update -g test-rg -n test-cluster --enable-azure-container-storage --container-storage-version 2
az aks create -g test-rg -n test-cluster --enable-azure-container-storage --container-storage-version 2

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change
[Component Name 2] az command b: Add some customer-facing feature


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

Copilot AI review requested due to automatic review settings August 27, 2025 22:38
@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Aug 27, 2025

️✔️AzureCLI-FullTest
️✔️acr
️✔️latest
️✔️3.12
️✔️3.13
️✔️acs
️✔️latest
️✔️3.12
️✔️3.13
️✔️advisor
️✔️latest
️✔️3.12
️✔️3.13
️✔️ams
️✔️latest
️✔️3.12
️✔️3.13
️✔️apim
️✔️latest
️✔️3.12
️✔️3.13
️✔️appconfig
️✔️latest
️✔️3.12
️✔️3.13
️✔️appservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️aro
️✔️latest
️✔️3.12
️✔️3.13
️✔️backup
️✔️latest
️✔️3.12
️✔️3.13
️✔️batch
️✔️latest
️✔️3.12
️✔️3.13
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.13
️✔️billing
️✔️latest
️✔️3.12
️✔️3.13
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️cdn
️✔️latest
️✔️3.12
️✔️3.13
️✔️cloud
️✔️latest
️✔️3.12
️✔️3.13
️✔️cognitiveservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.13
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.13
️✔️config
️✔️latest
️✔️3.12
️✔️3.13
️✔️configure
️✔️latest
️✔️3.12
️✔️3.13
️✔️consumption
️✔️latest
️✔️3.12
️✔️3.13
️✔️container
️✔️latest
️✔️3.12
️✔️3.13
️✔️containerapp
️✔️latest
️✔️3.12
️✔️3.13
️✔️core
️✔️latest
️✔️3.12
️✔️3.13
️✔️cosmosdb
️✔️latest
️✔️3.12
️✔️3.13
️✔️databoxedge
️✔️latest
️✔️3.12
️✔️3.13
️✔️dls
️✔️latest
️✔️3.12
️✔️3.13
️✔️dms
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventgrid
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventhubs
️✔️latest
️✔️3.12
️✔️3.13
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.13
️✔️find
️✔️latest
️✔️3.12
️✔️3.13
️✔️hdinsight
️✔️latest
️✔️3.12
️✔️3.13
️✔️identity
️✔️latest
️✔️3.12
️✔️3.13
️✔️iot
️✔️latest
️✔️3.12
️✔️3.13
️✔️keyvault
️✔️latest
️✔️3.12
️✔️3.13
️✔️lab
️✔️latest
️✔️3.12
️✔️3.13
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️maps
️✔️latest
️✔️3.12
️✔️3.13
️✔️marketplaceordering
️✔️latest
️✔️3.12
️✔️3.13
️✔️monitor
️✔️latest
️✔️3.12
️✔️3.13
️✔️mysql
️✔️latest
️✔️3.12
️✔️3.13
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.13
️✔️network
️✔️latest
️✔️3.12
️✔️3.13
️✔️policyinsights
️✔️latest
️✔️3.12
️✔️3.13
️✔️privatedns
️✔️latest
️✔️3.12
️✔️3.13
️✔️profile
️✔️latest
️✔️3.12
️✔️3.13
️✔️rdbms
️✔️latest
️✔️3.12
️✔️3.13
️✔️redis
️✔️latest
️✔️3.12
️✔️3.13
️✔️relay
️✔️latest
️✔️3.12
️✔️3.13
️✔️resource
️✔️latest
️✔️3.12
️✔️3.13
️✔️role
️✔️latest
️✔️3.12
️✔️3.13
️✔️search
️✔️latest
️✔️3.12
️✔️3.13
️✔️security
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.13
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.13
️✔️signalr
️✔️latest
️✔️3.12
️✔️3.13
️✔️sql
️✔️latest
️✔️3.12
️✔️3.13
️✔️sqlvm
️✔️latest
️✔️3.12
️✔️3.13
️✔️storage
️✔️latest
️✔️3.12
️✔️3.13
️✔️synapse
️✔️latest
️✔️3.12
️✔️3.13
️✔️telemetry
️✔️latest
️✔️3.12
️✔️3.13
️✔️util
️✔️latest
️✔️3.12
️✔️3.13
️✔️vm
️✔️latest
️✔️3.12
️✔️3.13

@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Aug 27, 2025

⚠️AzureCLI-BreakingChangeTest
⚠️acs
rule cmd_name rule_message suggest_message
⚠️ 1008 - ParaPropAdd aks create cmd aks create update parameter container_storage_version: added property choices=['1', '2']
⚠️ 1008 - ParaPropAdd aks update cmd aks update update parameter container_storage_version: added property choices=['1', '2']

@github-actions
Copy link

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

@yonzhan
Copy link
Collaborator

yonzhan commented Aug 27, 2025

Thank you for your contribution! We will review the pull request and get back to you soon.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances the Azure Container Storage version handling in AKS commands by adding support for version '2' and improving validation logic. The changes ensure users can specify version '2' (which follows the same behavior as the latest version) and prevent invalid parameter combinations.

  • Added validation to reject unsupported Azure Container Storage versions
  • Added validation to prevent using --container-storage-version with --disable-azure-container-storage
  • Extended supported versions to include both '1' and '2'

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
managed_cluster_decorator.py Added version validation logic and parameter conflict checks for Azure Container Storage configuration
_consts.py Added constant for supported Azure Container Storage versions including '1' and '2'

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Member

@FumingZhang FumingZhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could consider declaring the option in _params.py as shown below. This way, the CLI framework can help validate the value, which would save you some effort.

        c.argument(
            "container_storage_version",
            arg_type=get_enum_type(CONST_SUPPORTED_ACSTOR_VERSIONS),
        )

@nearora-msft
Copy link
Contributor Author

You could consider declaring the option in _params.py as shown below. This way, the CLI framework can help validate the value, which would save you some effort.

        c.argument(
            "container_storage_version",
            arg_type=get_enum_type(CONST_SUPPORTED_ACSTOR_VERSIONS),
        )

Fixed.

@FumingZhang
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@yonzhan
Copy link
Collaborator

yonzhan commented Aug 29, 2025

Please fix CI issues

@FumingZhang
Copy link
Member

FumingZhang commented Sep 8, 2025

Queued live test (re-queued for temp failures) to validate the change, test passed!

  • test_aks_create_with_azurecontainerstorage_v1
  • test_aks_create_with_azurecontainerstorage_v1_with_ephemeral_disk_parameters
  • test_aks_update_with_azurecontainerstorage_v1
  • test_aks_update_with_azurecontainerstorage_v1_with_ephemeral_disk_parameters
  • test_aks_create_with_azurecontainerstorage
  • test_aks_update_with_azurecontainerstorage

@yanzhudd
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@yanzhudd yanzhudd merged commit e67cbb0 into Azure:dev Sep 11, 2025
48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AKS az aks/acs/openshift Auto-Assign Auto assign by bot Storage az storage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants