Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ACS] az aks create/update: Introduce changes for Azure container storage in ACS cli #28251

Merged
merged 13 commits into from
Mar 20, 2024

Conversation

mukhoakash
Copy link
Contributor

Related command

Description

Testing Guide

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.

Copy link

azure-client-tools-bot-prd bot commented Jan 26, 2024

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

Copy link

Hi @mukhoakash,
Since the current milestone time is less than 7 days, this pr will be reviewed in the next milestone.

Copy link

azure-client-tools-bot-prd bot commented Jan 26, 2024

⚠️AzureCLI-BreakingChangeTest
⚠️acs
rule cmd_name rule_message suggest_message
⚠️ 1006 - ParaAdd aks create cmd aks create added parameter enable_azure_container_storage
⚠️ 1006 - ParaAdd aks create cmd aks create added parameter storage_pool_name
⚠️ 1006 - ParaAdd aks create cmd aks create added parameter storage_pool_option
⚠️ 1006 - ParaAdd aks create cmd aks create added parameter storage_pool_size
⚠️ 1006 - ParaAdd aks create cmd aks create added parameter storage_pool_sku
⚠️ 1006 - ParaAdd aks update cmd aks update added parameter azure_container_storage_nodepools
⚠️ 1006 - ParaAdd aks update cmd aks update added parameter disable_azure_container_storage
⚠️ 1006 - ParaAdd aks update cmd aks update added parameter enable_azure_container_storage
⚠️ 1006 - ParaAdd aks update cmd aks update added parameter storage_pool_name
⚠️ 1006 - ParaAdd aks update cmd aks update added parameter storage_pool_option
⚠️ 1006 - ParaAdd aks update cmd aks update added parameter storage_pool_size
⚠️ 1006 - ParaAdd aks update cmd aks update added parameter storage_pool_sku

@yonzhan
Copy link
Collaborator

yonzhan commented Jan 26, 2024

azure-container-storage

@mukhoakash mukhoakash changed the title [azure-container-storage]: Introduce changes for Azure container storage in ACS cli [ACS]: Introduce changes for Azure container storage in ACS cli Jan 26, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Auto-Assign Auto assign by bot label Jan 26, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the AKS az aks/acs/openshift label Jan 26, 2024
@FumingZhang
Copy link
Member

Could you please fix the failed CI checks?

err_msg = "Validation failed. " \
"Please ensure that storagepools are not being used. " \
"Unable to perform disable Azure Container Storage operation. " \
"Reseting cluster state."

Choose a reason for hiding this comment

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

nit: "Resetting"

update_settings.append({"cli.storagePool.ephemeralDisk.enabled": True})
disable_op_failure = True

# Since we are just reseting the cluster state,

Choose a reason for hiding this comment

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

nit: resetting


# If disabling type of storagepool in Azure Container Storage failed,
# define the existing resource values for ioEngine and hugepages for
# reseting the cluster state.

Choose a reason for hiding this comment

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

nit: resetting

if re.fullmatch(pattern, nodepool_names) is None:
raise InvalidArgumentValueError(
"Invalid --azure-container-storage-nodepools value. "
"Accepted value is a comma separated string of valid nodepool "

Choose a reason for hiding this comment

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

consistency: "node pools"
should be two distinct words in English, consistent with the AKS docs:
https://learn.microsoft.com/en-us/azure/aks/create-node-pools

in the command it is correct to use the form nodepool

f'Nodepool: {nodepool} not found. '
'Please provide a comma separated string of existing nodepool names '
'in --azure-container-storage-nodepools.'
f"\nNodepools available in the cluster are: {', '.join(agentpool_names)}."

Choose a reason for hiding this comment

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

consistency: Node pools

else:
raise ArgumentUsageError(
f'Cannot set --storage-pool-option as {CONST_STORAGE_POOL_OPTION_NVME} '
'as no supporting nodepool found which can support ephemeral NVMe disk.'

Choose a reason for hiding this comment

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

readibility: "as none of the node pools can support ephemeral NVMe disk."

err_msg = "Validation failed. " \
f"Please ensure that storagepools of type {storage_pool_type} are not being used. " \
f"Unable to perform disable Azure Container Storage operation. " \
"Reseting cluster state."

Choose a reason for hiding this comment

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

nit: Resetting

if "pre-upgrade hooks failed" in str(ex):
raise UnknownError(err_msg) from ex
raise UnknownError(
"Validation failed. Unable to perform Azure Container Storage operation. Reseting cluster state."

Choose a reason for hiding this comment

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

nit: Resetting

except Exception as disable_ex:
logger.error(
"Failure observed while disabling Azure Container Storage storagepool type: %s.\nError: %s"
"Reseting cluster state.", storage_pool_type, disable_ex

Choose a reason for hiding this comment

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

nit: Resetting

Copy link
Member

@andyliuliming andyliuliming left a comment

Choose a reason for hiding this comment

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

not a aks addon. should not be added into the az aks cmd

andyliuliming

This comment was marked as spam.

@mukhoakash mukhoakash changed the title [ACS]: Introduce changes for Azure container storage in ACS cli [ACS] : Introduce changes for Azure container storage in ACS cli Mar 15, 2024
@mukhoakash mukhoakash changed the title [ACS] : Introduce changes for Azure container storage in ACS cli [ACS] az aks create/update: Introduce changes for Azure container storage in ACS cli Mar 16, 2024
@yanzhudd
Copy link
Contributor

Please fix the CI issues

@mukhoakash
Copy link
Contributor Author

Please fix the CI issues

CIs fixed.

@mukhoakash
Copy link
Contributor Author

Live test triggered:

  • test_aks_create_with_azurecontainerstorage
  • test_aks_update_with_azurecontainerstorage

@yanzhudd
Copy link
Contributor

Please note that CLI is only responsible for the code style and specification, but not business logic. So it it better to get approval from the service team first.
Besides, there appears to be one pending change request.

@mukhoakash
Copy link
Contributor Author

Live test triggered:

  • test_aks_create_with_azurecontainerstorage
  • test_aks_update_with_azurecontainerstorage

Link to updated live tests.

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.

lgtm

please remove the prints used for debug purpose

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.

8 participants