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

Add clone from VolumeSnapshot docs #2574

Merged
merged 1 commit into from
Feb 10, 2023

Conversation

akalenyu
Copy link
Collaborator

@akalenyu akalenyu commented Feb 5, 2023

Signed-off-by: Alex Kalenyuk akalenyu@redhat.com

What this PR does / why we need it:

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 #

Special notes for your reviewer:

Release note:

NONE

@kubevirt-bot kubevirt-bot added release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Feb 5, 2023
@kubevirt-bot kubevirt-bot requested review from aglitke and awels February 5, 2023 15:22
@akalenyu
Copy link
Collaborator Author

akalenyu commented Feb 5, 2023

/cc @mhenriks @duyanyan

@akalenyu akalenyu force-pushed the clone-from-snap-docs branch 3 times, most recently from f7ca231 to 2ce1d3e Compare February 5, 2023 15:26
Copy link
Contributor

@ShellyKa13 ShellyKa13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! had some suggestions and a question

One examples is ceph, where this would be about utilizing RBD layering.
A much simpler example would be storage that can take around 5-10 minutes to snapshot a 200GB volume.

### Note: Data Volume cloning from snapshot source can work together with namespace transfer and size expansion
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note is usually marked with > or * not as another headline i.e ###

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx, done

* Create the restore PVC
* Set the claim reference of the PV to point to the new target PVC
- If not possible:
* Attempt [host-assisted cloning](./clone-datavolume.md) between 2 PVCs where CDI creates a temporary restore PVC from the snapshot to act as the source.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I understand, you write this Attempt under the if not possible which refers to if not possible to restore from said snapshot yet here you write that you create a temp restore PVC to do regular host assisted clone. what did I miss?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this is confusing, added Check if restore from said snapshot to desired target is possible to tackle
Consider someone cloning a target that has a different provisioner. We can still restore from the snapshot and attempt host assisted

The idea is that we provide a "complete" clone from volumesnapshot package

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahh ok got it!

- DataVolume is created with a Snapshot source
- Check if restore from said snapshot is possible (as described in Prerequisites):
- If possible:
* Create the restore PVC
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe mentions that this is a temp PVC that will be deleted after?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added

- Check if restore from said snapshot is possible (as described in Prerequisites):
- If possible:
* Create the restore PVC
* Set the claim reference of the PV to point to the new target PVC
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe mention that you change the claim ref of the restore PV from the restore PVC to the target PVC?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a link to ns transfer doc

spec:
source:
http:
url: http://.../Fedora-Cloud-Base-34-1.2.x86_64.qcow2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consider using an actual path that the user can try and use?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>
@akalenyu akalenyu force-pushed the clone-from-snap-docs branch from 2ce1d3e to acaa016 Compare February 8, 2023 14:12
@ShellyKa13
Copy link
Contributor

/lgtm

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Feb 8, 2023
@mhenriks
Copy link
Member

mhenriks commented Feb 9, 2023

/approve

@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mhenriks

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubevirt-bot kubevirt-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 9, 2023
@alromeros
Copy link
Collaborator

/test pull-containerized-data-importer-e2e-destructive

1 similar comment
@awels
Copy link
Member

awels commented Feb 10, 2023

/test pull-containerized-data-importer-e2e-destructive

@kubevirt-bot kubevirt-bot merged commit 15826e7 into kubevirt:main Feb 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants