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
Include hotplugged disks in online VM snapshot #6642
Conversation
08340d6
to
867b49e
Compare
867b49e
to
43b39c1
Compare
/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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mhenriks done
I love that this is net fewer lines! |
43b39c1
to
096c2d5
Compare
/retest |
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>
096c2d5
to
ed4cb12
Compare
/retest |
/lgtm |
[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 |
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: