fix(vm): avoid restartAwaitingChanges flicker for hotplug block devices#2496
Open
eofff wants to merge 2 commits into
Open
fix(vm): avoid restartAwaitingChanges flicker for hotplug block devices#2496eofff wants to merge 2 commits into
eofff wants to merge 2 commits into
Conversation
Signed-off-by: Valeriy Khorunzhin <valeriy.khorunzhin@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
When
enableParavirtualizationis enabled, VM block devices are handled through hotplug. Because of that, changes inblockDeviceRefsmust not be reported by the VM change comparator as changes that require restart handling.This PR stops reporting
blockDeviceRefsadd, remove, and reorder operations when paravirtualization is enabled in both the current and desired VM specs. Unit tests cover these hotplug block device scenarios and verify that they do not produce VM spec changes.Why do we need it, and what problem does it solve?
With paravirtualization enabled, attaching or detaching disks is a hotplug operation and should not affect the VM restart-awaiting-changes state.
Before this change,
blockDeviceRefsupdates were still detected as VM spec changes. As a result,restartAwaitingChangescould briefly appear or flicker while disks were being connected, disconnected, or reordered, even though these operations do not require a VM restart in the paravirtualized flow.What is the expected result?
For a VM with
enableParavirtualization: truein both the current and desired specs:restartAwaitingChanges.restartAwaitingChanges.restartAwaitingChanges.For VMs without paravirtualization, the existing restart-required behavior for block device changes is preserved.
Checklist