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

Is it possible to create a VolumeSnapshot in kubernetes from an existing snapshot in digitalocean? #292

Closed
e-nikolov opened this issue Mar 26, 2020 · 5 comments · Fixed by #294

Comments

@e-nikolov
Copy link

e-nikolov commented Mar 26, 2020

pod-single-existing-volume shows how to add an existing volume as a PersistentVolume by setting an annotation:

annotations:
  # fake it by indicating this is provisioned dynamically, so the system
  # works properly
  pv.kubernetes.io/provisioned-by: dobs.csi.digitalocean.com

But I haven't found a way to do the same for an existing snapshot. Is it currently possible to do that?

@timoreimann
Copy link
Contributor

Hey @e-nikolov 👋

I wasn't sure myself whether importing snapshots is possible. After reading through the snapshot-announcing blog post again and playing around with it though, I can say that it does work. 🎉

Instead of outlining the necessary steps in this issue, I decided to extend our examples right away. I'd appreciate if you could have a look at the PR referenced above and let me know if it works for you.

Thanks!

@e-nikolov
Copy link
Author

e-nikolov commented Mar 27, 2020

Hi, it's possible that I did something wrong, but after following this, the imported snapshot in k8s has its restoreSize set to ~800GB when in the DigitalOcean control panel it's only 300GB.

Have you seen such a difference when you did it? I also tried manually setting the restoreSize, but it got overridden.

@timoreimann
Copy link
Contributor

@e-nikolov I suppose you set resources.requests.storage on the PVC accordingly?

@e-nikolov
Copy link
Author

@timoreimann If you mean the PVC created from the snapshot, yes I did, but it told me the minimum was 800GB.

@timoreimann
Copy link
Contributor

Sorry for the long delay -- turned out this issue came with a rat's tail of problems. Specifically, we did not return the minimum size of the snapshot correctly (#298) and had a bug in our implementation to fetch the right snapshot (#299). You were definitely affected by the former issue.

Master has these issues fixed, and the import guide is now working according to my tests.

We plan to make a CSI release soonish, so please keep an eye out on our releases page. Once you're running on what is now reflected in the master branch, you should be able to import snapshots properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants