trident
trident copied to clipboard
Expand PVC uses VolumeSize and ignored Snapshot reserve
Describe the bug Fails to expand PVC if the new requested size is smaller than the total volume size. This should be calculated on the DataSize instead (= Volume size - SnapshotReserve)
Environment Provide accurate information about the environment to help us reproduce the issue.
- Trident version: 22.10
- Trident installation flags used: Default install through Helm
- Container runtime: [e.g. Docker 19.03.1-CE]
- Kubernetes version: v1.25.8+37a9a08
- Kubernetes orchestrator: Openshift 4.12.18
- Kubernetes enabled feature gates:
- OS: RHEL CoreOS 412.86.202305161131-0 (Ootpa)
- NetApp backend types: ONTAP 9.12.1P2
- Other:
To Reproduce Steps to reproduce the behavior:
- Create a TridentBackendConfig with the "ontap-nas" storagedriver and a default snapshotreserve of 30%
- Create PVC of 10GB using this TridentBackendConfig
- Expand the PVC to 11GB
- PVC expand fails with an error because 11Gb is smaller than the current volume size which is 13Gb (10Gb data + 3G snapshotreserve)
Expected behavior recalculate new size while take in account the snapshotreserve => set Volume size to 14,3Gb (= 11Gb data space + 30% snapshot reserve)
Additional context Add any other context about the problem here.
Problem still exists in 23.07
Hi @tgoetheyn Please let us know if this issue still exists with the newer versions of Trident. If this has been resolved, please close the issue.
Closing. Please re-open if you notice this issue with newer versions of Trident.