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

Include hotplugged disks in online VM snapshot #6642

Merged

Conversation

ShellyKa13
Copy link
Contributor

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:

Include hot-plugged disks in a Online VM Snapshot

@kubevirt-bot kubevirt-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. size/L labels Oct 19, 2021
@ShellyKa13 ShellyKa13 force-pushed the include-hot-plug-in-vm-snapshot branch from 08340d6 to 867b49e Compare October 20, 2021 09:26
@ShellyKa13 ShellyKa13 force-pushed the include-hot-plug-in-vm-snapshot branch from 867b49e to 43b39c1 Compare October 20, 2021 10:58
@ShellyKa13
Copy link
Contributor Author

/retest

@@ -228,6 +200,13 @@ func (s *vmSnapshotSource) Spec() (snapshotv1.SourceSpec, error) {
annotations[k] = v
}
vmCpy.ObjectMeta.Annotations = annotations
vmi, exists, err := s.controller.getVMI(s.vm)
if err != nil || !exists {
return snapshotv1.SourceSpec{}, err
Copy link
Member

Choose a reason for hiding this comment

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

Is it possible that the VMI no longer exists? If so, returning an empty spec the right thing to do?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you are right I should return error if !exists

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mhenriks done

@mhenriks
Copy link
Member

I love that this is net fewer lines!

@ShellyKa13 ShellyKa13 force-pushed the include-hot-plug-in-vm-snapshot branch from 43b39c1 to 096c2d5 Compare October 25, 2021 11:26
@ShellyKa13
Copy link
Contributor Author

/retest

@kubevirt-bot kubevirt-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 25, 2021
Signed-off-by: Shelly Kagan <skagan@redhat.com>
Remove the check and the constraint of can't do
vm snapshot with hotplug disks, instead include the persistent
volumes in the snapshot so those will be restored in compared
to unpersistent disks which will not be included in the snapshot
and the restore.

Signed-off-by: Shelly Kagan <skagan@redhat.com>
@ShellyKa13 ShellyKa13 force-pushed the include-hot-plug-in-vm-snapshot branch from 096c2d5 to ed4cb12 Compare October 26, 2021 07:33
@kubevirt-bot kubevirt-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 26, 2021
@ShellyKa13
Copy link
Contributor Author

/retest

@mhenriks
Copy link
Member

/lgtm
/approve

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Oct 27, 2021
@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 Oct 27, 2021
@kubevirt-bot kubevirt-bot merged commit ed80fa5 into kubevirt:main Oct 27, 2021
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 Denotes a PR that will be considered when it comes time to generate release notes. size/XL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants