kubernetes-sigs / azurefile-csi-driver

Azure File CSI Driver
Apache License 2.0
147 stars 136 forks source link

PVC using Bring Your Own share in a StorageClass throws error #1927

Open david-garcia-garcia opened 2 weeks ago

david-garcia-garcia commented 2 weeks ago

What happened:

I am trying to setup a storage class using this driver that mounts an existing File Share. Permissions are correctly set on both the share and the storage account for the cluster identity.

This is the definition of the StorageClass

allowVolumeExpansion: true
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  creationTimestamp: "2024-06-19T09:31:23Z"
  name: sc-shared-fileshare-dgarcia
  resourceVersion: "61194002"
  uid: 5a0075e1-426a-4074-bfaf-7518ec566f18
mountOptions:
- file_mode=0777
- mfsymlinks
- gid=0
- uid=0
- dir_mode=0777
- nosharesock
- cache=strict
parameters:
  resourceGroup: xx
  shareName: data
  storageAccount: xx
  subscriptionID: xx
provisioner: file.csi.azure.com
reclaimPolicy: Retain
volumeBindingMode: Immediate

When I create a PVC I get:

Warning  ProvisioningFailed    8m25s                   file.csi.azure.com_csi-azurefile-controller-7d9d494db4-mw8fp_b7e1aea6-2850-4aac-8259-4bf77d0dac82  failed to provision volume with StorageClass "sc- │
│ shared-fileshare-dgarcia": rpc error: code = Internal desc = failed to create file share(data) on account(mystorageaccount) type() subsID(xx) rg(rg-sandboxes-shared) loca │
│ tion() size(10), error: storage.FileSharesClient#Create: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="InvalidHeaderValue" Mes │
│ sage="The value for one of the HTTP headers is not in the correct format.\nRequestId:8cefd430-501a-001f-342d-c256d9000000\nTime:2024-06-19T09:43:58.4428140Z" 

What you expected to happen:

No error is thrown.

How to reproduce it:

Create a storage class and then a PVC, the PVC fails.

Environment:

andyzhangx commented 2 weeks ago

what is the mystorageaccount sku? the minimum size of premium account is 100GB