fix(vm): skip template network sync for main-only VMs#2484
Open
LopatinDmitr wants to merge 4 commits into
Open
fix(vm): skip template network sync for main-only VMs#2484LopatinDmitr wants to merge 4 commits into
LopatinDmitr wants to merge 4 commits into
Conversation
Do not run the network template synchronization path for virtual machines that only use the implicit Main network. The network hotplug reconciliation introduced a networksOutOfSync path that materialized the implicit default pod network in the KubeVirt VM template for already running VMs. Older virt-controller versions can observe that [] -> [default] template diff during module rollout and mark the VM with RestartRequired, which DVP then exposes as AwaitingRestartToApplyConfiguration. The same path also caused a misleading ConfigurationApplied=False message about waiting for SDN even though there are no additional SDN-managed networks. Skip the out-of-sync network reconciliation and readiness/update path for Main-only VMs. Additional networks still use the existing SDN readiness flow. Signed-off-by: Dmitry Lopatin <dmitry.lopatin@flant.com>
Signed-off-by: Dmitry Lopatin <dmitry.lopatin@flant.com>
ee89bbf to
f66a2bf
Compare
Signed-off-by: Dmitry Lopatin <dmitry.lopatin@flant.com>
Signed-off-by: Dmitry Lopatin <dmitry.lopatin@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
Skip the network template synchronization path for VirtualMachines that only use the implicit Main network.
The network hotplug reconciliation can detect a mismatch between the desired implicit default network and an existing KubeVirt VM template that does not explicitly contain
spec.template.spec.domain.devices.interfaces/spec.template.spec.networks. For Main-only VMs this mismatch must not be reconciled into a running KubeVirt VM template, because materializing the implicit default network as an explicit template field creates a non-live-updatable diff for KubeVirt.Why do we need it, and what problem does it solve?
After the network hotplug changes,
SyncKvvmHandlercan enter thenetworksOutOfSync -> applyNetworkReadinessSync -> updateKVVMpath for a Main-only VM.For such VMs, the running VMI already has the default pod network via KubeVirt defaulting, but the KubeVirt VM template may not explicitly contain it. Updating the template while the VM is running changes:
Older
virt-controllerversions can see this[] -> [default]template diff during module rollout and set KubeVirtRestartRequired=Truewitha non-live-updatable field was changed in the template spec. DVP then exposes it asAwaitingRestartToApplyConfiguration=TruewithUnexpectedState.The same path can also produce a misleading
ConfigurationApplied=Falsemessage about waiting for SDN, even though Main-only VMs do not have additional SDN-managed interfaces to wait for.This fix skips the out-of-sync network reconciliation and readiness/update path for Main-only VMs. VMs with additional networks still use the existing SDN readiness and hotplug flow.
What is the expected result?
spec.networksor with only the Main network.ConfigurationApplied=FalsewithWaiting for SDN to configure network interfaces on the pod.AwaitingRestartToApplyConfiguration=Truecaused by materializing the implicit default network in the KubeVirt VM template.Checklist
Changelog entries