[Clone API]: Support snapshot source
What this PR does / why we need it: This PR adds support for cloning with a snapshot as source. In other words, after this PR we would be able to clone a Snapshot into a running VM.
The relates to this issue: https://github.com/kubevirt/kubevirt/issues/6089.
Long story short: the term "template" is overloaded and has different meanings according to the context. This PR aims to resolve the "bookmark VM" use-case. In this use-case, the user (e.g. the system admin) wishes to take a clean image of an OS, modify it in some way, and then create a "bookmark" that would serve as a base for creating more similar VMs.
In other words, the system-admin would:
- Create some VM
- Perform changes: Install apps / download files / change configurations / anything else
- Create a snapshot of the VM
- (optionally) Delete the original VM
- After some time, create new VMs from the saved snapshot
Please note that since the clone object defined the different cloning configurations, it's possible to clone the same snapshot many times with different configurations according to the user's need.
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes https://github.com/kubevirt/kubevirt/issues/6089 (Well, at least partially)
Release note:
Introduce support for clones with a snapshot source (e.g. clone snapshot -> VM)
Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign alonakaplan for approval by writing /assign @alonakaplan in a comment. For more information see:The Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
FYI /cc @mhenriks @lyarwood @fabiand @ShellyKa13
Thanks a lot for your insightful review @mhenriks! All comments are addressed.
Thanks a lot @ShellyKa13! Your review is very insightful and appreciated! All of your comments are addressed :+1:
I think this looks good, I think my only question is about the location of func tests
Thanks for your review @mhenriks!
I've moved the functional tests outside of the storage package here: https://github.com/kubevirt/kubevirt/pull/8458/commits/736558717fdd716b53c02025a1b312a3bdb1de8c
Let me know if anything else is missing
/retest
@mhenriks
Not sure this is complete. What about syncInfo.snapshotReady?
Great catch! Thanks!
/retest
/retest
/retest
@iholder-redhat: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:
| Test name | Commit | Details | Required | Rerun command |
|---|---|---|---|---|
| pull-kubevirt-check-unassigned-tests | 4e6b3480d9fc17de092d5dfd8c3f20ce9959eecd | link | true | /test pull-kubevirt-check-unassigned-tests |
| pull-kubevirt-e2e-k8s-1.22-sig-performance | 4e6b3480d9fc17de092d5dfd8c3f20ce9959eecd | link | false | /test pull-kubevirt-e2e-k8s-1.22-sig-performance |
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: enp0s3
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [enp0s3]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
Nice work /lgtm
+1 Indeed!
/test pull-kubevirt-check-unassigned-tests
/retest-required
/retest-required
/lgtm