Skip to content

feat(vmbda): forbid disk hotplug during migration#2569

Open
loktev-d wants to merge 5 commits into
mainfrom
feat/vm/forbid-rwo-hotplug-during-migration
Open

feat(vmbda): forbid disk hotplug during migration#2569
loktev-d wants to merge 5 commits into
mainfrom
feat/vm/forbid-rwo-hotplug-during-migration

Conversation

@loktev-d

@loktev-d loktev-d commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Description

Forbids hot-plugging a disk into a virtual machine while it is migrating.

Why do we need it, and what problem does it solve?

A volume can only be attached on a single node. Hotplugging one during a live migration pins its PVC to a node and breaks scheduling of the migration target. This change prevents that class of failure by refusing to start a hotplug while the VM is migrating; the attachment simply waits and proceeds automatically once migration completes.

What is the expected result?

With a VM running and an RWO VirtualDisk available (not attached):

  1. Start a live migration of the VM.
  2. While it is migrating, create a VirtualMachineBlockDeviceAttachment for the disk.
  3. The VMBDA stays in Pending with Attached=False / reason BlockedByMigration ("Cannot hotplug a disk while the virtual machine is migrating.")
  4. When the migration completes, the VMBDA is re-reconciled and transitions to Attached.

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.

Changelog entries

section: vmbda
type: feature
summary: forbid disk hotplug during migration

Signed-off-by: Daniil Loktev <lokt.daniil@gmail.com>
@loktev-d loktev-d marked this pull request as draft July 1, 2026 16:00
loktev-d added 2 commits July 2, 2026 11:01
Signed-off-by: Daniil Loktev <lokt.daniil@gmail.com>
Signed-off-by: Daniil Loktev <lokt.daniil@gmail.com>
@loktev-d loktev-d added the e2e/run Run e2e test on cluster of PR author label Jul 2, 2026
@deckhouse-BOaTswain

deckhouse-BOaTswain commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Workflow has started.
Follow the progress here: Workflow Run

The target step completed with status: failure.

@deckhouse-BOaTswain deckhouse-BOaTswain removed the e2e/run Run e2e test on cluster of PR author label Jul 2, 2026
@loktev-d loktev-d added the e2e/run Run e2e test on cluster of PR author label Jul 2, 2026
@deckhouse-BOaTswain

deckhouse-BOaTswain commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Workflow has started.
Follow the progress here: Workflow Run

The target step completed with status: failure.

@deckhouse-BOaTswain deckhouse-BOaTswain removed the e2e/run Run e2e test on cluster of PR author label Jul 2, 2026
@loktev-d loktev-d added the e2e/run Run e2e test on cluster of PR author label Jul 3, 2026
@deckhouse-BOaTswain

deckhouse-BOaTswain commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Workflow has started.
Follow the progress here: Workflow Run

The target step completed with status: failure.

@deckhouse-BOaTswain deckhouse-BOaTswain removed the e2e/run Run e2e test on cluster of PR author label Jul 3, 2026
Signed-off-by: Daniil Loktev <lokt.daniil@gmail.com>
@loktev-d loktev-d changed the title feat(vmbda): forbid hotplug of RWO disks during migration feat(vmbda): forbid disk hotplug during migration Jul 7, 2026
eofff
eofff previously approved these changes Jul 7, 2026
@loktev-d loktev-d marked this pull request as ready for review July 7, 2026 15:31
@loktev-d loktev-d added this to the v1.10.0 milestone Jul 7, 2026
Signed-off-by: Vladislav Panfilov <vladislav.panfilov@flant.com>
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.

4 participants