-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Allow VMExport to start if completed VMI exists #13240
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
Allow VMExport to start if completed VMI exists #13240
Conversation
It is possible that a VMI has completed or failed and one wants to export the VM disk. This change allows the VMExport to become ready if either of those conditions are met. The default behavior if a VM is stopped normally is to delete the VMI, but in case this doesn't happen, the VMExport should still be allowed to start. Signed-off-by: Alexander Wels <awels@redhat.com>
@@ -408,6 +411,34 @@ var _ = Describe("PVC source", func() { | |||
Entry("PVCs", createVMWithPVCs, "kubevirt", "kubevirt", verifyKubevirtInternal), | |||
Entry("Memorydump and pvc", createVMWithPVCandMemoryDump, "kubevirt", "archive", verifyMixedInternal), | |||
) | |||
It("Should create VM export, when VM is stopped, but VMI exists in succeeded state", func() { |
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.
Does it make sense to add also a test for the failed case?
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.
yeah I agree should be a pretty small change to make it test also the failed cased. other then that looks good and I will lgtm
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.
Done
The code looks good, I have only one question. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alicefr 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 |
Signed-off-by: Alexander Wels <awels@redhat.com>
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.
cool
/lgtm
Required labels detected, running phase 2 presubmits: |
What this PR does
Before this PR:
It is possible that a VMI has completed or failed and one wants to export the VM disk. Right now the VMExport will remain pending because it finds the VMI and refuses to start.
After this PR:
This change allows the VMExport to become ready if a VMI exists that is either failed or succeeded.
Fixes https://issues.redhat.com/browse/CNV-49376
Why we need it and why it was done in this way
The following tradeoffs were made:
The following alternatives were considered:
Links to places where the discussion took place:
Special notes for your reviewer
The default behavior if a VM is stopped normally is to delete the VMI, but in case this doesn't
happen, the VMExport should still be allowed to start.
Checklist
This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.
Release note