fix(vm): revert migrated volumes when kvvmi is missing#2506
Open
yaroslavborbat wants to merge 2 commits into
Open
fix(vm): revert migrated volumes when kvvmi is missing#2506yaroslavborbat wants to merge 2 commits into
yaroslavborbat wants to merge 2 commits into
Conversation
Signed-off-by: Yaroslav Borbat <yaroslav.borbat@flant.com>
Signed-off-by: Yaroslav Borbat <yaroslav.borbat@flant.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The fix restores migrated volumes in
kvvm.specwhenkvvmiis already missing.It also fixes the VMBDA case: existing hotplug volumes are now rebuilt from the current
VirtualDisk.Status.Target.PersistentVolumeClaim, so after migration rollback they no longer keep a stale target PVC inkvvm.spec.Why do we need it, and what problem does it solve?
A user could hit this during the following flow:
kvvmiis already deleted, whilekvvm.specstill points to migrated target PVCs.In that state KubeVirt sets
ManualRecoveryRequiredand refuses to start the VM. The controller could not revert volumes withoutkvvmi, and VMBDA hotplug volumes could also keep stale PVCs because they were preserved inkvvm.specbut not rebuilt from the current disk state.This change makes the controller restore source PVCs in both cases, which unblocks VM recovery after failed migration.
What is the expected result?
Reproduce with a VM that has a local-storage disk, including a VMBDA-attached disk:
Expected result:
kvvm.spec;ManualRecoveryRequiredno longer blocks recovery in this case;kvvm.specediting.Checklist
Changelog entries