Open IsaSih opened 1 month ago
@btat this was found during 2.9.2 testing and QA has asked this to be put into the release notes. Let me or @IsaSih if the docs team needs more info.
cc @martyav since Marty his driving the release notes for 2.9.2.
@gaktive a few questions to categorize this note correctly -- is this specific to AKS? Is this more of a UI bug or a provisioning bug?
@martyav we'd have to investigate but it reads more of a UI bug right now.
Per offline discussion with @IsaSih -- the expected behavior here is that when the Pool mode is 'System' the user should not be able to set the minimum node count to 0. This is not currently validated in the UI. Whether the pool mode is 'System' or 'User' the minimum count must be equal to or less than the node count. That is already validated in the UI.
Setup
*Describe the bug
Found while testing issue https://github.com/rancher/dashboard/issues/11848.
For system mode node pools, the minimum node count has to be at least 1. However, the UI permits the user to enable Auto Scaling and to input the minimum count as 0. When trying to provision the AKS cluster, the process fails with the error
Error failed to create cluster: PUT https://management.azure.com/subscriptions/8753d09e-7139-4b5a-bcd4-1c8cc4ecce26/resourceGroups/aks-resource-group-scus/providers/Microsoft.ContainerService/managedClusters/system-test -------------------------------------------------------------------------------- RESPONSE 400: 400 Bad Request ERROR CODE: InvalidParameter -------------------------------------------------------------------------------- { "code": "InvalidParameter", "details": null, "message": "agentPoolProfile.minCount was 0. It must be greater or equal to minCount:1 and less than or equal to maxCount:1000. If allowedMinCount was expected to be 0 but is 1: 1) The nodepool is a VMAS pool. 2) api Version is less than 2020-03-01. 3) The node is a system pool.", "subcode": "", "target": "agentPoolProfile.minCount" }
This error is prevented if user selects minimum node count at least equal to the node count. This happens only for system mode pools. For the user mode, the UI displays a warning banner that should be displayed for the system mode as well.
To Reproduce
Provision the AKS cluster with 2 node pools (one system mode w/ node count 1 and the other is a user mode w/ node count 0) both w/ Auto Scaling enabled, and minimum nodes 0 max 3, I get the error that the minimum node count needs to be 1.
Result
Expected Result When Auto Scaling is enabled, UI must prevent minCount from being less than node count for a given node pool in AKS cluster provisioning