fix(core): skip node placement migration during volume migration#2497
Draft
danilrwx wants to merge 3 commits into
Draft
fix(core): skip node placement migration during volume migration#2497danilrwx wants to merge 3 commits into
danilrwx wants to merge 3 commits into
Conversation
09b1590 to
8ce1b97
Compare
Signed-off-by: Daniil Antoshin <daniil.antoshin@flant.com>
Signed-off-by: Daniil Antoshin <daniil.antoshin@flant.com>
A node placement update is fulfilled via a live migration (Evict VMOP). For a VMI that is not live-migratable, e.g. one with local/non-shared disks, a live migration can never reconcile the placement, so triggering it only produces a failing VMOP. Previously the handler skipped node placement migration only while volume migration signals were active (VolumesChange, MigratedVolumes, active MigrationState). Once they cleared after a volume migration with local disks, the handler could still fire an Evict when NodePlacementNotMatched was True and the recorded placement sum diverged from the current one, which happened intermittently due to a race during the affinity revert. Gate the handler on the KVVMI LiveMigratable condition: if the VMI is not live-migratable, never trigger the migration. The placement sum is not recorded in this case so the migration can still fire once the VMI becomes migratable again (e.g. after disks are migrated to shared storage). Signed-off-by: Daniil Antoshin <daniil.antoshin@flant.com>
3f26743 to
446f2ee
Compare
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
Prevent the workload updater from creating
nodeplacement-update-*VMOPs while a KubeVirt VMI has an active volume migration state.The node placement handler now skips automatic migration when
VolumesChange=Trueorstatus.migratedVolumesis not empty.Why do we need it, and what problem does it solve?
During local disk migration, KubeVirt can temporarily set
NodePlacementNotMatched=Truebecause the running pod placement and the desired disk/node affinity differ while volumes are being switched.Previously, the workload updater treated this transient state as a node placement change and created an extra
nodeplacement-update-*operation for the same VM. This could interfere with disk migration and leave the VM/VMI in a stale volume migration state.What is the expected result?
VolumesChange=Trueor non-emptystatus.migratedVolumes, nonodeplacement-update-*VMOP is created.Checklist
Changelog entries