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

Incorrect cachingType validation for Ultra disks as data disks #2429

Closed
damdo opened this issue Jun 27, 2022 · 0 comments · Fixed by #2430
Closed

Incorrect cachingType validation for Ultra disks as data disks #2429

damdo opened this issue Jun 27, 2022 · 0 comments · Fixed by #2430
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@damdo
Copy link
Member

damdo commented Jun 27, 2022

/kind bug

Preamble:
Azure Ultra disks only support un-cached read/writes, see Azure Ultra disks limitations.

What steps did you take and what happened:
An Azure Machine with the following data disk was created:

        - nameSuffix: mydata
          diskSizeGB: 256
          lun: 1
          managedDisk:
            storageAccountType: "UltraSSD_LRS"
          cachingType: ReadWrite

No validation error was observed when storageAccountType is was set to UltraSSD_LRS and cachingType to ReadOnly or ReadWrite or when no value is set for cachingType (this is currently defaulted to ReadWrite by the Defaulting Webhook).

Instead a failure was observed at vm creation time:

E0627 10:02:14.628416      45 controller.go:317] controller/azuremachine "msg"="Reconciler error" "error"="failed to reconcile AzureMachine: failed to reconcile AzureMachine service virtualmachine: failed to create resource default-11551/default-11551-control-plane-wbsz8 (service: virtualmachine): compute.VirtualMachinesClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code=\"InvalidParameter\" Message=\"Storage Account type UltraSSD_LRS is not supported with caching type ReadWrite. Please use caching type None.\" Target=\"dataDisk.caching\"" "name"="default-11551-control-plane-wbsz8" "namespace"="default" "reconciler group"="infrastructure.cluster.x-k8s.io" "reconciler kind"="AzureMachine" 

What did you expect to happen:
When one or more data disks are defined with storageAccountType UltraSSD_LRS (the keyword for Ultra disks), no cachingType option should be accepted rather than: None.
If cachingType is not set or empty and storageAccountType is set to UltraSSD_LRS, cachingType should be defaulted to None.

Environment:

  • cluster-api-provider-azure version: v1.3.2
  • Kubernetes version: (use kubectl version): v1.23.x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants