NetApp/trident

PVC with small storage capacity request will not bind

aglitke opened this issue · 2 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.

this commit does exactly that:
7cbcccf

seems to be part of version 24.06

@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.