fix(vm): fix affinity when migrating VM with local disks#2508
Open
loktev-d wants to merge 8 commits into
Open
Conversation
Signed-off-by: Yaroslav Borbat <yaroslav.borbat@flant.com>
Signed-off-by: Yaroslav Borbat <yaroslav.borbat@flant.com>
Contributor
|
Workflow has started. The target step completed with status: failure. |
744d6ca to
ed05fc2
Compare
Signed-off-by: Daniil Loktev <70405899+loktev-d@users.noreply.github.com>
Contributor
|
Workflow has started. The target step completed with status: failure. |
Contributor
|
Workflow has started. The target step completed with status: failure. |
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
Fixes intermittent unschedulable migration of VMs with local-storage disks attached via VMBDA. Three coordinated changes:
state.go(resolvePVCName/PVNodeAffinityTerms) — during a volume migration, derive the VM pod's node affinity from the migration target, never the source PVC's bound node.migration_volumes.go(SyncVolumes) — when volumes are already synced but the affinity drifted, re-patch it.kvvm_utils.go(syncAttachedVMBDAHotplugVolumes) — skip disks that are migrating, leaving their hotplug volume to the migration flow. Prevents the main sync from reverting the hotplug volume to the source PVC.Why do we need it, and what problem does it solve?
Migrating a VM with local disks attached through VMBDA failed intermittently . The migration target pod was pinned to the source node — KubeVirt copies the VM-pod node affinity and forbids the source node via anti-affinity, so the pod was unschedulable and the migration timed out.
What is the expected result?
A VM with VMBDA-attached local-storage disks evicts/migrates reliably
Checklist
Changelog entries