Skip to content

fix(vm): avoid restartAwaitingChanges flicker for hotplug block devices#2496

Open
eofff wants to merge 2 commits into
mainfrom
fix/vm/no-restart-awaiting-changes-while-connect-bd
Open

fix(vm): avoid restartAwaitingChanges flicker for hotplug block devices#2496
eofff wants to merge 2 commits into
mainfrom
fix/vm/no-restart-awaiting-changes-while-connect-bd

Conversation

@eofff

@eofff eofff commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Description

When enableParavirtualization is enabled, VM block devices are handled through hotplug. Because of that, changes in blockDeviceRefs must not be reported by the VM change comparator as changes that require restart handling.

This PR stops reporting blockDeviceRefs add, 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, blockDeviceRefs updates were still detected as VM spec changes. As a result, restartAwaitingChanges could 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: true in both the current and desired specs:

  • Adding a block device does not trigger restartAwaitingChanges.
  • Removing a block device does not trigger restartAwaitingChanges.
  • Reordering block devices does not trigger restartAwaitingChanges.
  • Hotplug disk operations do not make the VM look like it has pending restart-required changes.

For VMs without paravirtualization, the existing restart-required behavior for block device changes is preserved.

Checklist

  • The code is covered by unit tests.
  • e2e tests passed.
  • Documentation updated according to the changes.
  • Changes were tested in the Kubernetes cluster manually.

Signed-off-by: Valeriy Khorunzhin <valeriy.khorunzhin@flant.com>
Signed-off-by: Valeriy Khorunzhin <valeriy.khorunzhin@flant.com>
@eofff eofff changed the title fix restart changes fix(vm): ignore block device changes for paravirtualized VMs Jun 17, 2026
@eofff eofff changed the title fix(vm): ignore block device changes for paravirtualized VMs fix(vm): avoid restartAwaitingChanges flicker for hotplug block devices Jun 17, 2026
@eofff eofff added this to the v1.10.0 milestone Jun 17, 2026
@eofff eofff marked this pull request as ready for review June 17, 2026 09:13
@eofff eofff requested a review from LopatinDmitr June 17, 2026 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant