Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set PVC storage request at restore time to volumesnapshot size. #4826

Open
kaovilai opened this issue Apr 12, 2022 · 0 comments
Open

Set PVC storage request at restore time to volumesnapshot size. #4826

kaovilai opened this issue Apr 12, 2022 · 0 comments

Comments

@kaovilai
Copy link
Member

kaovilai commented Apr 12, 2022

We may want to set the requested storage for PVC being restored to the higher value between backedUpPVC.spec.request.storage.size and volumesnapshot.status.restoresize.

Describe the problem/challenge you have
[A description of the current limitation/problem/challenge that you are experiencing.]

  • Created PVC-A with 100MiB request
    • ebs driver rounds up storage capacity to nearest GiB, in this case 1GiB
  • Backup Pod and PVC using velero with gp2-csi
    • snapshot taken has the size of 1GiB
  • Restore Pod and PVC
    • velero try to recreate PVC with 100MiB storage request with a 1GiB VolumeSnapshot as dataSource
      • ERROR

Result:

Generated from ebs.csi.aws.com_<nodeip>_<uuid?>
9 times in the last 3 minutes
failed to provision volume with StorageClass "gp2-csi": error getting handle for DataSource Type VolumeSnapshot by Name velero-pc-data-lmkpz: requested volume size 104857600 is less than the size 1073741824 for the source snapshot velero-pc-data-lmkpz

Issue filed in csi driver
kubernetes-sigs/aws-ebs-csi-driver#1209
This issue may exist with other drivers as well.

Describe the solution you'd like
[A clear and concise description of what you want to happen.]
Some mitigation or documentation around this "known issue".

  • tell users to request in 1GiB increments when using EBS
  • restoredPVC.requestedCapacity = backedUpPVC.Capacity -> (therefore) restoredPVC.requestedCapacity = volumesnapshot.status.restoreSize

Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]

Environment:

  • Velero version (use velero version):
  • Kubernetes version (use kubectl version):
  • Kubernetes installer & version:
  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release):

Vote on this issue!

This is an invitation to the Velero community to vote on issues, you can see the project's top voted issues listed here.
Use the "reaction smiley face" up to the right of this comment to vote.

  • 👍 for "The project would be better with this feature added"
  • 👎 for "This feature will not enhance the project in a meaningful way"
@kaovilai kaovilai changed the title Mitigation or documentation for ebs.csi.aws.com VolumeSnapshots created on PVC < 1GiB too large to restore from. Mitigation and/or documentation for ebs.csi.aws.com VolumeSnapshots created on PVC < 1GiB too large to restore from. Apr 12, 2022
@kaovilai kaovilai changed the title Mitigation and/or documentation for ebs.csi.aws.com VolumeSnapshots created on PVC < 1GiB too large to restore from. Mitigation and/or documentation for VolumeSnapshots size not matching PVC requested storage Apr 12, 2022
@kaovilai kaovilai changed the title Mitigation and/or documentation for VolumeSnapshots size not matching PVC requested storage Mitigation for failed PVC restore from VolumeSnapshots of a different size. Apr 13, 2022
@kaovilai kaovilai changed the title Mitigation for failed PVC restore from VolumeSnapshots of a different size. Set PVC storage request at restore time to volumesnapshot size. Apr 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants