-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Conversation
️✔️AzureCLI-FullTest
|
Hi @mukhoakash, |
|
rule | cmd_name | rule_message | suggest_message |
---|---|---|---|
aks create | cmd aks create added parameter enable_azure_container_storage |
||
aks create | cmd aks create added parameter storage_pool_name |
||
aks create | cmd aks create added parameter storage_pool_option |
||
aks create | cmd aks create added parameter storage_pool_size |
||
aks create | cmd aks create added parameter storage_pool_sku |
||
aks update | cmd aks update added parameter azure_container_storage_nodepools |
||
aks update | cmd aks update added parameter disable_azure_container_storage |
||
aks update | cmd aks update added parameter enable_azure_container_storage |
||
aks update | cmd aks update added parameter storage_pool_name |
||
aks update | cmd aks update added parameter storage_pool_option |
||
aks update | cmd aks update added parameter storage_pool_size |
||
aks update | cmd aks update added parameter storage_pool_sku |
azure-container-storage |
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." |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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 " |
There was a problem hiding this comment.
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)}." |
There was a problem hiding this comment.
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.' |
There was a problem hiding this comment.
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." |
There was a problem hiding this comment.
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." |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Resetting
There was a problem hiding this 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
e50a41e
to
08a0b06
Compare
08a0b06
to
fe3b857
Compare
az aks create/update
: Introduce changes for Azure container storage in ACS cli
8f4f401
to
793e417
Compare
Please fix the CI issues |
6a5ca6f
to
3bb1221
Compare
CIs fixed. |
Live test triggered:
|
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. |
Link to updated live tests. |
There was a problem hiding this 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
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 featureThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.