NetApp / trident

Storage orchestrator for containers
Apache License 2.0
756 stars 219 forks source link

PVC with small storage capacity request will not bind #885

Closed aglitke closed 2 months ago

aglitke commented 7 months ago

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.

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.

pidreher commented 2 months ago

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

seems to be part of version 24.06

clintonk commented 2 months ago

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