这是indexloc提供的服务,不要输入任何密码
Skip to content

Expand PVC uses VolumeSize and ignored Snapshot reserve #834

@tgoetheyn

Description

@tgoetheyn

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions