trident icon indicating copy to clipboard operation
trident copied to clipboard

PVC with small storage capacity request will not bind

Open aglitke opened this issue 1 year ago • 1 comments

Describe the bug

I create a simple small PVC with a storage request of 10MiB. This PVC will not be bound since Trident does not support PVCs smaller than 20MiB. According to kubernetes [documentation|https://kubernetes.io/docs/concepts/storage/persistent-volumes/#binding] the storage must provision at least what was requested but may provision a larger volume. I would expect Trident to provision a volume of 20MiB and bind to this PVC.

Environment Provide accurate information about the environment to help us reproduce the issue.

  • Trident version:
  • Trident installation flags used:
  • Container runtime:
  • Kubernetes version: v1.27.8+4fab27b
  • Kubernetes orchestrator: OpenShift 4.14
  • Kubernetes enabled feature gates:
  • OS: RHCOS-4.14
  • NetApp backend types: ONTap
  • Other:

The bug should be reproducible on any supported version of Trident.

To Reproduce Create the following PVC:

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: small-pvc
  namespace: default
spec:
  accessModes:
  - ReadWriteMany
  resources:
    requests:
      storage: 10Mi
  storageClassName: trident-iscsi
  volumeMode: Block

The PVC will remain pending indefinitely. I do not believe the access mode or volume mode are relevant to the issue. The expected behavior is a bound pvc to a volume of the minimum allowed size.

Expected behavior The PVC should bind to a PV of the minim allowable size.

aglitke avatar Feb 12 '24 20:02 aglitke

this commit does exactly that: https://github.com/NetApp/trident/commit/7cbcccf204aa0755c9ce48812c7c92c8e61d0146

seems to be part of version 24.06

pidreher avatar Jul 05 '24 05:07 pidreher

@pidreher is correct, this fix is available in 24.06. ONTAP-backed PVs (except Flexgroups) may be as small as 20 MiB, which is ONTAP's lower limit for Flexvols. PVCs smaller than that will be bound to 20 MiB volumes.

clintonk avatar Jul 05 '24 15:07 clintonk