fix(vm): sync unschedulable KVVM on vmclass placement change#2177
Open
fix(vm): sync unschedulable KVVM on vmclass placement change#2177
Conversation
Signed-off-by: Daniil Antoshin <daniil.antoshin@flant.com>
86a4bbf to
0690a4d
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
Fix synchronization of internal KubeVirt VM when the VM is in
Unschedulablestate and placement-related settings are changed via VMClass.The workaround path in
SyncKvvmHandlernow treats these change paths as placement policy updates:virtualMachineClassNameVirtualMachineClass:spec.nodeSelectorVirtualMachineClass:spec.tolerationsThis allows controller to apply KVVM update and recycle launcher pod for unschedulable cases.
Also added unit tests for placement-path detection in
isPlacementPolicyChanged.Why do we need it, and what problem does it solve?
When VM pod creation fails and KVVM stays
Unschedulable, changing VMClass (for example,discovery->generic) did not trigger full KVVM resync for placement-dependent fields.As a result,
domain.cpu/tolerationscould stay stale and VM remained stuck.This change makes unschedulable recovery react to VMClass-driven placement changes.
What is the expected result?
Unschedulablestate.spec.nodeSelector/spec.tolerations.Unschedulablewhen constraints become schedulable.Checklist
Changelog entries