Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-65555

[Azure-file-CSI-Driver]CreateVolume response does not reflect actual file share size after rounding

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • 4.21
    • Storage / Operators
    • None
    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • Important
    • None
    • None
    • Proposed
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      See https://github.com/kubernetes-sigs/azurefile-csi-driver/issues/2851

      Description of problem:

          When creating an NFS volume (PVC) smaller than the minimum Premium file share size (100Gi), the CSI driver correctly rounds up the file share size to 100Gi in Azure, but the CreateVolume response returns the original requested capacity instead of the actual provisioned capacity.

      Version-Release number of selected component (if applicable):

          4.21 and previous releases

      How reproducible:

          Always

      Steps to Reproduce:

      1. Create a StorageClass with Premium_LRS SKU and NFS protocol:
      apiVersion: storage.k8s.io/v1
      kind: StorageClass
      metadata:
        name: azurefile-csi-nfs
      provisioner: file.csi.azure.com
      parameters:
        protocol: nfs
        skuName: Premium_LRS
      mountOptions:
        - nconnect=4
      reclaimPolicy: Delete
      volumeBindingMode: Immediate
      
      2. Create a PVC requesting less than 100Gi (e.g., 100Mi):
      apiVersion: v1
      kind: PersistentVolumeClaim
      metadata:
        name: test-nfs-small-pvc
        namespace: azurefile-bug-test
      spec:
        accessModes:
          - ReadWriteMany
        storageClassName: azurefile-csi-nfs
        resources:
          requests:
            storage: 100Mi
      
      3. Wait for PVC to be bound and check the PV capacity:
      oc get pv pvc-00b09c5c-0169-4589-b8d4-4e7b457b58b3 -o yaml

      Actual results:

      The PV reports capacity.storage: 100Mi (the original requested size), even though the actual Azure file share was created with 100Gi capacity.
      PV Output:
      spec:
        capacity:
          storage: 100Mi  # ❌ Should be 100Gi    

      Expected results:

      The PV should report capacity.storage: 100Gi (or 107374182400 bytes) since Azure Premium file shares have a minimum size of 100Gi and the driver rounds up requests below this threshold.    

      Additional info:

          

              rbednar@redhat.com Roman Bednar
              wduan@redhat.com Wei Duan
              None
              None
              Wei Duan Wei Duan
              None
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: